2016-09-15 15:02:36 -07:00
|
|
|
/*
|
|
|
|
* @file spark_logic.h
|
|
|
|
*
|
|
|
|
* @date Sep 15, 2016
|
2020-01-07 21:02:40 -08:00
|
|
|
* @author Andrey Belomutskiy, (c) 2012-2020
|
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
|
|
|
|
2021-11-16 01:15:29 -08:00
|
|
|
void onTriggerEventSparkLogic(bool limitedSpark, uint32_t trgEventIndex, int rpm, efitick_t edgeTimestamp);
|
2016-11-01 18:03:07 -07:00
|
|
|
void turnSparkPinHigh(IgnitionEvent *event);
|
2019-05-07 14:10:47 -07:00
|
|
|
void fireSparkAndPrepareNextSchedule(IgnitionEvent *event);
|
2021-11-16 01:15:29 -08:00
|
|
|
int getNumberOfSparks(ignition_mode_e mode);
|
|
|
|
percent_t getCoilDutyCycle(int rpm);
|
|
|
|
void initializeIgnitionActions();
|
2016-09-15 15:02:36 -07:00
|
|
|
|
2019-12-23 19:12:55 -08:00
|
|
|
int isIgnitionTimingError(void);
|