fome-fw/firmware/controllers/engine_cycle/main_trigger_callback.h

31 lines
879 B
C
Raw Normal View History

2015-07-10 06:01:56 -07:00
/**
* @file main_trigger_callback.h
* @brief Main logic header
*
*
* @date Feb 9, 2013
2020-01-07 21:02:40 -08:00
* @author Andrey Belomutskiy, (c) 2012-2020
2015-07-10 06:01:56 -07:00
*/
2019-12-23 17:19:13 -08:00
#pragma once
2015-07-10 06:01:56 -07:00
2018-09-16 19:00:14 -07:00
#include "engine.h"
2015-07-10 06:01:56 -07:00
#include "event_registry.h"
2017-05-25 19:28:04 -07:00
void initMainEventListener(Logging *sharedLogger DECLARE_ENGINE_PARAMETER_SUFFIX);
2015-07-10 06:01:56 -07:00
2018-03-04 20:53:48 -08:00
void startPrimeInjectionPulse(DECLARE_ENGINE_PARAMETER_SIGNATURE);
2015-07-10 06:01:56 -07:00
2018-03-04 19:32:02 -08:00
void startSimultaniousInjection(Engine *engine);
2018-03-04 19:45:20 -08:00
void endSimultaniousInjection(InjectionEvent *event);
2020-01-10 20:17:58 -08:00
void turnInjectionPinHigh(InjectionEvent *event);
void turnInjectionPinLow(InjectionEvent *event);
2016-09-26 18:03:18 -07:00
// reset injection switch counter if the engine started spinning
void updatePrimeInjectionPulseState(DECLARE_ENGINE_PARAMETER_SIGNATURE);
// Internal use only - exposed for tests
void handleFuelInjectionEvent(int injEventIndex, InjectionEvent *event,
int rpm, efitick_t nowNt DECLARE_ENGINE_PARAMETER_SUFFIX);