diff --git a/firmware/hw_layer/digital_input_hw.cpp b/firmware/hw_layer/digital_input_hw.cpp index b54d156c7c..6bb023227a 100644 --- a/firmware/hw_layer/digital_input_hw.cpp +++ b/firmware/hw_layer/digital_input_hw.cpp @@ -18,6 +18,7 @@ * * rus084 is reminding that EXTI could be enough for our needs * See joystick.cpp + * See trigger_input.cpp * * @date Jun 23, 2013 * @author Andrey Belomutskiy, (c) 2012-2018 @@ -271,4 +272,4 @@ void startInputDriver(digital_input_s *hw, bool isActiveHigh) { hw->started = true; } -#endif +#endif /* EFI_WAVE_ANALYZER */ diff --git a/firmware/hw_layer/joystick.cpp b/firmware/hw_layer/joystick.cpp index 4370487983..6e4c42efbf 100644 --- a/firmware/hw_layer/joystick.cpp +++ b/firmware/hw_layer/joystick.cpp @@ -9,6 +9,9 @@ * be using same EXTI line. See https://stm32f4-discovery.net/2014/08/stm32f4-external-interrupts-tutorial/ * See also comments in digital_input_hw.cpp * + * + * TODO: In release 18.2.0 the EXT driver is no more provided for STM32, there is a PAL demo under /testhal/STM32/multi/PAL with examples of callbacks and synchronous API. + * * @date Jan 2, 2015 * @author Andrey Belomutskiy, (c) 2012-2018 */ @@ -139,6 +142,7 @@ static uint32_t getExtMode(ioportid_t port) { return 0; } +// EXT is not able to give you the front direction but you could read the pin in the callback. static void enableExti(brain_pin_e pin, extcallback_t cb) { if (pin == GPIO_UNASSIGNED) return; diff --git a/firmware/hw_layer/trigger_input.cpp b/firmware/hw_layer/trigger_input.cpp index fb66757ddc..20a4dac37a 100644 --- a/firmware/hw_layer/trigger_input.cpp +++ b/firmware/hw_layer/trigger_input.cpp @@ -2,6 +2,12 @@ * @file trigger_input.cpp * @brief Position sensor hardware layer * + * todo: code reuse with digital_input_hw.cpp was never finished + * todo: at the moment due to half-done code reuse we depend on EFI_WAVE_ANALYZER which makes no sense, need to finish this refactoring + * todo: VVT implementation is a nasty copy-paste :( + * + * see digital_input_hw.cp + * * @date Dec 30, 2012 * @author Andrey Belomutskiy, (c) 2012-2018 */