rusefi-1/firmware/controllers/engine_cycle/spark_logic.h

27 lines
868 B
C
Raw Normal View History

2016-09-15 15:02:36 -07:00
/*
* @file spark_logic.h
*
* @date Sep 15, 2016
2019-12-23 17:19:13 -08:00
* @author Andrey Belomutskiy, (c) 2012-2019
2016-09-15 15:02:36 -07:00
*/
2019-12-02 19:28:32 -08:00
#pragma once
2016-09-15 15:02:36 -07:00
#include "engine.h"
2017-05-25 19:28:04 -07:00
int isInjectionEnabled(DECLARE_ENGINE_PARAMETER_SIGNATURE);
void onTriggerEventSparkLogic(bool limitedSpark, uint32_t trgEventIndex, int rpm DECLARE_ENGINE_PARAMETER_SUFFIX);
2016-09-21 20:03:22 -07:00
void initSparkLogic(Logging *sharedLogger);
2016-11-01 18:03:07 -07:00
void turnSparkPinHigh(IgnitionEvent *event);
void fireSparkAndPrepareNextSchedule(IgnitionEvent *event);
2017-05-15 20:33:22 -07:00
int getNumberOfSparks(ignition_mode_e mode DECLARE_ENGINE_PARAMETER_SUFFIX);
percent_t getCoilDutyCycle(int rpm DECLARE_ENGINE_PARAMETER_SUFFIX);
2019-11-17 06:32:12 -08:00
void initializeIgnitionActions(DECLARE_ENGINE_PARAMETER_SIGNATURE);
2016-09-15 15:02:36 -07:00
2019-12-02 19:28:32 -08:00
#define TRIGGER_EVENT_UNDEFINED -1
bool scheduleOrQueue(AngleBasedEvent *event,
uint32_t trgEventIndex,
angle_t angle,
schfunc_t callback,
void *param DECLARE_ENGINE_PARAMETER_SUFFIX);