auto-sync

This commit is contained in:
rusEfi 2016-07-26 22:01:50 -04:00
parent 903024dd79
commit d720d9f10a
3 changed files with 8 additions and 3 deletions

View File

@ -372,7 +372,7 @@ void initHardware(Logging *l) {
engine->addConfigurationListener(adcConfigListener);
#if EFI_CJ125 || defined(__DOXYGEN__)
initCJ125();
initCJ125(sharedLogger);
#endif
printMsg(sharedLogger, "initHardware() OK!");

View File

@ -22,6 +22,7 @@ EXTERN_ENGINE;
static SimplePwm wboHeaderControl;
static OutputPin wboHeaderPin;
static OutputPin cj125Cs;
static Logging *logger;
static THD_WORKING_AREA(cjThreadStack, UTILITY_THREAD_STACK_SIZE);
@ -80,7 +81,8 @@ static void cj125test(void) {
}
void initCJ125(void) {
void initCJ125(Logging *sharedLogger) {
logger = sharedLogger;
// still a lot to be done here :)
if (!boardConfiguration->isCJ125Enabled)
@ -103,6 +105,9 @@ void initCJ125(void) {
}
scheduleMsg(logger, "Starting cj125 spi driver");
spiStart(driver, &cj125spicfg);
addConsoleAction("cj125", cj125test);
chThdCreateStatic(cjThreadStack, sizeof(cjThreadStack), LOWPRIO, (tfunc_t) cjThread, NULL);

View File

@ -13,7 +13,7 @@
#define CJ125_NORMAL 0x89 // 137 decimal
#define CJ125_CALBRT 0x9D // 157 decimal
void initCJ125(void);
void initCJ125(Logging *shared);
typedef enum {
CJ125_IDLE = 0