flexibility for SENT
This commit is contained in:
parent
94d765e4d8
commit
94512571a5
|
@ -190,13 +190,34 @@
|
|||
/*
|
||||
* ICU driver system settings.
|
||||
*/
|
||||
#ifndef STM32_ICU_USE_TIM1
|
||||
#define STM32_ICU_USE_TIM1 FALSE
|
||||
#endif
|
||||
|
||||
#ifndef STM32_ICU_USE_TIM2
|
||||
#define STM32_ICU_USE_TIM2 TRUE
|
||||
#endif
|
||||
|
||||
#ifndef STM32_ICU_USE_TIM3
|
||||
#define STM32_ICU_USE_TIM3 FALSE
|
||||
#endif
|
||||
|
||||
#ifndef STM32_ICU_USE_TIM4
|
||||
#define STM32_ICU_USE_TIM4 FALSE
|
||||
#endif
|
||||
|
||||
#ifndef STM32_ICU_USE_TIM5
|
||||
#define STM32_ICU_USE_TIM5 FALSE
|
||||
#endif
|
||||
|
||||
#ifndef STM32_ICU_USE_TIM8
|
||||
#define STM32_ICU_USE_TIM8 FALSE
|
||||
#endif
|
||||
|
||||
#ifndef STM32_ICU_USE_TIM9
|
||||
#define STM32_ICU_USE_TIM9 FALSE
|
||||
#endif
|
||||
|
||||
#define STM32_ICU_TIM1_IRQ_PRIORITY ICU_PRIORITY
|
||||
#define STM32_ICU_TIM2_IRQ_PRIORITY ICU_PRIORITY
|
||||
#define STM32_ICU_TIM3_IRQ_PRIORITY ICU_PRIORITY
|
||||
|
@ -220,8 +241,14 @@
|
|||
* PWM driver system settings.
|
||||
*/
|
||||
#define STM32_PWM_USE_ADVANCED FALSE
|
||||
|
||||
#ifndef STM32_PWM_USE_TIM1
|
||||
#define STM32_PWM_USE_TIM1 TRUE
|
||||
#endif
|
||||
|
||||
#ifndef STM32_PWM_USE_TIM2
|
||||
#define STM32_PWM_USE_TIM2 FALSE
|
||||
#endif
|
||||
|
||||
#ifndef STM32_PWM_USE_TIM3
|
||||
// Hellen often uses TIM3 for ETB
|
||||
|
|
|
@ -119,8 +119,7 @@
|
|||
* ChibiOS limitation is that only channels #1 and #2 could be used for input capture
|
||||
* Could this be unified with getConfigForPin() method?
|
||||
*/
|
||||
bool getIcuParams(brain_pin_e hwPin, iomode_t *af_ptr, ICUDriver ** icu_ptr, icuchannel_t *channel_ptr, uint32_t *clock_ptr)
|
||||
{
|
||||
bool getIcuParams(brain_pin_e hwPin, iomode_t *af_ptr, ICUDriver ** icu_ptr, icuchannel_t *channel_ptr, uint32_t *clock_ptr) {
|
||||
switch (hwPin) {
|
||||
case Gpio::A0:
|
||||
RETURN_ICU5(ICU_CHANNEL_1);
|
||||
|
|
Loading…
Reference in New Issue