rusefi/firmware/controllers/can/can_bench_test.cpp

36 lines
682 B
C++
Raw Normal View History

2022-09-29 20:01:06 -07:00
#include "pch.h"
#include "can_bench_test.h"
#include "can_msg_tx.h"
#define CAN_BENCH_HEADER 0x66
#define CAN_BENCH_GET_COUNT 0
#define CAN_BENCH_GET_SET 1
#define CAN_BENCH_GET_CLEAR 2
#if EFI_CAN_SUPPORT
void processCanBenchTest(const CANRxFrame& frame) {
if (CAN_EID(frame) != CAN_ECU_HW_META) {
return;
}
if (frame.data8[0] != CAN_BENCH_HEADER) {
return;
}
uint8_t command = frame.data8[1];
if (command == CAN_BENCH_GET_COUNT) {
CanTxMessage msg(CanCategory::BENCH_TEST, CAN_ECU_HW_META + 1, 8);
msg[0] = CAN_BENCH_HEADER;
msg[1] = 0;
msg[2] = getBoardMetaOutputsCount();
} else if (command == CAN_BENCH_GET_COUNT) {
}
}
#endif // EFI_CAN_SUPPORT