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); engine->addConfigurationListener(adcConfigListener);
#if EFI_CJ125 || defined(__DOXYGEN__) #if EFI_CJ125 || defined(__DOXYGEN__)
initCJ125(); initCJ125(sharedLogger);
#endif #endif
printMsg(sharedLogger, "initHardware() OK!"); printMsg(sharedLogger, "initHardware() OK!");

View File

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

View File

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