de-coupling things a bit

This commit is contained in:
rusefi 2019-12-24 00:26:23 -05:00
parent daf1a0be21
commit 50d78f648b
3 changed files with 6 additions and 7 deletions

View File

@ -48,6 +48,8 @@
#include "fuel_math.h"
#include "settings.h"
#include "aux_pid.h"
#include "spark_logic.h"
#include "aux_valves.h"
#include "accelerometer.h"
#include "counter64.h"
#include "perf_trace.h"
@ -723,9 +725,11 @@ void commonInitEngineController(Logging *sharedLogger DECLARE_ENGINE_PARAMETER_S
#if (EFI_ENGINE_CONTROL && EFI_SHAFT_POSITION_INPUT) || EFI_SIMULATOR || EFI_UNIT_TEST
if (CONFIG(isEngineControlEnabled)) {
initAuxValves(sharedLogger PASS_ENGINE_PARAMETER_SUFFIX);
/**
* This method initialized the main listener which actually runs injectors & ignition
* This method adds trigger listener which actually schedules ignition
*/
initSparkLogic(sharedLogger);
initMainEventListener(sharedLogger PASS_ENGINE_PARAMETER_SUFFIX);
}
#endif /* EFI_ENGINE_CONTROL */

View File

@ -52,7 +52,6 @@
#include "engine.h"
#include "perf_trace.h"
#include "aux_valves.h"
#include "backup_ram.h"
EXTERN_ENGINE
@ -415,7 +414,7 @@ uint32_t *cyccnt = (uint32_t*) &DWT->CYCCNT;
* This is the main trigger event handler.
* Both injection and ignition are controlled from this method.
*/
void mainTriggerCallback(trigger_event_e ckpSignalType, uint32_t trgEventIndex DECLARE_ENGINE_PARAMETER_SUFFIX) {
static void mainTriggerCallback(trigger_event_e ckpSignalType, uint32_t trgEventIndex DECLARE_ENGINE_PARAMETER_SUFFIX) {
ScopePerf perf(PE::MainTriggerCallback);
(void) ckpSignalType;
@ -600,9 +599,6 @@ static void showMainInfo(Engine *engine) {
void initMainEventListener(Logging *sharedLogger DECLARE_ENGINE_PARAMETER_SUFFIX) {
logger = sharedLogger;
efiAssertVoid(CUSTOM_ERR_6631, engine!=NULL, "null engine");
initSparkLogic(logger);
initAuxValves(logger PASS_ENGINE_PARAMETER_SUFFIX);
#if EFI_PROD_CODE
addConsoleActionP("maininfo", (VoidPtr) showMainInfo, engine);

View File

@ -14,7 +14,6 @@
#include "event_registry.h"
void initMainEventListener(Logging *sharedLogger DECLARE_ENGINE_PARAMETER_SUFFIX);
void mainTriggerCallback(trigger_event_e ckpSignalType, uint32_t eventIndex DECLARE_ENGINE_PARAMETER_SUFFIX);
void startPrimeInjectionPulse(DECLARE_ENGINE_PARAMETER_SIGNATURE);