fome-fw/firmware/controllers/trigger/spark_logic.h

22 lines
708 B
C
Raw Normal View History

2016-09-15 15:02:36 -07:00
/*
* @file spark_logic.h
*
* @date Sep 15, 2016
2017-01-03 03:05:22 -08:00
* @author Andrey Belomutskiy, (c) 2012-2017
2016-09-15 15:02:36 -07:00
*/
#ifndef CONTROLLERS_TRIGGER_SPARK_LOGIC_H_
#define CONTROLLERS_TRIGGER_SPARK_LOGIC_H_
#include "engine.h"
int isInjectionEnabled(engine_configuration_s *engineConfiguration);
2017-05-15 20:33:22 -07:00
void handleSpark(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 turnSparkPinLow(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);
2016-09-15 15:02:36 -07:00
#endif /* CONTROLLERS_TRIGGER_SPARK_LOGIC_H_ */