auto-sync
This commit is contained in:
parent
a3ad82682f
commit
ffe28254ac
|
@ -949,6 +949,8 @@ static void getValue(const char *paramStr) {
|
|||
scheduleMsg(&logger, "isCJ125Enabled=%d", boardConfiguration->isCJ125Enabled);
|
||||
} else if (strEqualCaseInsensitive(paramStr, "warningPeriod")) {
|
||||
scheduleMsg(&logger, "warningPeriod=%d", engineConfiguration->warningPeriod);
|
||||
} else if (strEqualCaseInsensitive(paramStr, "isHip9011Enabled")) {
|
||||
scheduleMsg(&logger, "isHip9011Enabled=%d", boardConfiguration->isHip9011Enabled);
|
||||
}
|
||||
|
||||
#if EFI_RTC || defined(__DOXYGEN__)
|
||||
|
|
|
@ -23,6 +23,9 @@ static SimplePwm wboHeaderControl;
|
|||
static OutputPin wboHeaderPin;
|
||||
static OutputPin cj125Cs;
|
||||
static Logging *logger;
|
||||
static unsigned char tx_buff[1];
|
||||
static unsigned char rx_buff[1];
|
||||
|
||||
|
||||
static THD_WORKING_AREA(cjThreadStack, UTILITY_THREAD_STACK_SIZE);
|
||||
|
||||
|
@ -79,6 +82,20 @@ static msg_t cjThread(void)
|
|||
|
||||
static void cj125test(void) {
|
||||
|
||||
// read identity command
|
||||
spiSelect(driver);
|
||||
tx_buff[0] = IDENT_REG_RD;
|
||||
spiSend(driver, 1, tx_buff);
|
||||
|
||||
spiReceive(driver, 1, rx_buff);
|
||||
int value = rx_buff[0] & 0xF8;
|
||||
|
||||
spiUnselect(driver);
|
||||
|
||||
scheduleMsg(logger, "cj125 got %x", value);
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
void initCJ125(Logging *sharedLogger) {
|
||||
|
|
Loading…
Reference in New Issue