From 995795eeb6d45421203240551b5f8df0e28e6424 Mon Sep 17 00:00:00 2001 From: rusefi Date: Wed, 9 Sep 2020 10:21:14 -0400 Subject: [PATCH] Hellen says merge #1772 trigger h --- firmware/hw_layer/trigger_input.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/firmware/hw_layer/trigger_input.h b/firmware/hw_layer/trigger_input.h index 3a83f46f6b..58f19ac129 100644 --- a/firmware/hw_layer/trigger_input.h +++ b/firmware/hw_layer/trigger_input.h @@ -21,4 +21,17 @@ void applyNewTriggerInputPins(void); void startTriggerInputPins(void); void stopTriggerInputPins(void); +#if HAL_TRIGGER_USE_ADC && HAL_USE_ADC +// This detector has 2 modes for low-RPM (ADC) and fast-RPM (EXTI) +enum triggerAdcMode_t { + TRIGGER_NONE = 0, + TRIGGER_ADC, + TRIGGER_EXTI, +}; + +adc_channel_e getAdcChannelForTrigger(void); +void addAdcChannelForTrigger(void); +void triggerAdcCallback(adcsample_t value); +#endif /* HAL_USE_ADC */ + #endif /* CRANK_INPUT_H_ */