Enabled ICU on G4.

git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@13051 27425a3e-05d8-49a3-a47f-9c15f0e5edd8
This commit is contained in:
Giovanni Di Sirio 2019-09-29 16:14:17 +00:00
parent 3719f651a9
commit fe34446321
4 changed files with 19 additions and 11 deletions

View File

@ -86,7 +86,7 @@
* @brief Enables the I2C subsystem. * @brief Enables the I2C subsystem.
*/ */
#if !defined(HAL_USE_I2C) || defined(__DOXYGEN__) #if !defined(HAL_USE_I2C) || defined(__DOXYGEN__)
#define HAL_USE_I2C TRUE #define HAL_USE_I2C FALSE
#endif #endif
/** /**

View File

@ -188,6 +188,13 @@
/* /*
* ICU driver system settings. * ICU driver system settings.
*/ */
#define STM32_ICU_USE_TIM1 FALSE
#define STM32_ICU_USE_TIM2 FALSE
#define STM32_ICU_USE_TIM3 FALSE
#define STM32_ICU_USE_TIM4 FALSE
#define STM32_ICU_USE_TIM5 FALSE
#define STM32_ICU_USE_TIM8 FALSE
#define STM32_ICU_USE_TIM15 FALSE
/* /*
* PWM driver system settings. * PWM driver system settings.

View File

@ -86,8 +86,7 @@ static inline void tim20_irq_deinit(void) {
/* Driver interrupt handlers. */ /* Driver interrupt handlers. */
/*===========================================================================*/ /*===========================================================================*/
#if (HAL_USE_ICU && STM32_ICU_USE_TIM20) || \ #if (HAL_USE_PWM && STM32_PWM_USE_TIM20) || \
(HAL_USE_PWM && STM32_PWM_USE_TIM20) || \
defined(__DOXYGEN__) defined(__DOXYGEN__)
/** /**
* @brief TIM20-UP interrupt handler. * @brief TIM20-UP interrupt handler.
@ -102,9 +101,7 @@ OSAL_IRQ_HANDLER(STM32_TIM20_UP_HANDLER) {
/* Not used by GPT.*/ /* Not used by GPT.*/
#endif #endif
#if HAL_USE_ICU #if HAL_USE_ICU
#if STM32_ICU_USE_TIM20 /* Not used by ICU.*/
icu_lld_serve_interrupt(&ICUD20);
#endif
#endif #endif
#if HAL_USE_PWM #if HAL_USE_PWM
#if STM32_PWM_USE_TIM20 #if STM32_PWM_USE_TIM20
@ -116,8 +113,7 @@ OSAL_IRQ_HANDLER(STM32_TIM20_UP_HANDLER) {
} }
#endif #endif
#if (HAL_USE_ICU && STM32_ICU_USE_TIM20) || \ #if (HAL_USE_PWM && STM32_PWM_USE_TIM20) || \
(HAL_USE_PWM && STM32_PWM_USE_TIM20) || \
defined(__DOXYGEN__) defined(__DOXYGEN__)
/** /**
* @brief TIM20-CC interrupt handler. * @brief TIM20-CC interrupt handler.
@ -132,9 +128,7 @@ OSAL_IRQ_HANDLER(STM32_TIM20_CC_HANDLER) {
/* Not used by GPT.*/ /* Not used by GPT.*/
#endif #endif
#if HAL_USE_ICU #if HAL_USE_ICU
#if STM32_ICU_USE_TIM20 /* Not used by ICU.*/
icu_lld_serve_interrupt(&ICUD20);
#endif
#endif #endif
#if HAL_USE_PWM #if HAL_USE_PWM
#if STM32_PWM_USE_TIM20 #if STM32_PWM_USE_TIM20

View File

@ -199,6 +199,13 @@
/* /*
* ICU driver system settings. * ICU driver system settings.
*/ */
#define STM32_ICU_USE_TIM1 ${doc.STM32_ICU_USE_TIM1!"FALSE"}
#define STM32_ICU_USE_TIM2 ${doc.STM32_ICU_USE_TIM2!"FALSE"}
#define STM32_ICU_USE_TIM3 ${doc.STM32_ICU_USE_TIM3!"FALSE"}
#define STM32_ICU_USE_TIM4 ${doc.STM32_ICU_USE_TIM4!"FALSE"}
#define STM32_ICU_USE_TIM5 ${doc.STM32_ICU_USE_TIM5!"FALSE"}
#define STM32_ICU_USE_TIM8 ${doc.STM32_ICU_USE_TIM8!"FALSE"}
#define STM32_ICU_USE_TIM15 ${doc.STM32_ICU_USE_TIM15!"FALSE"}
/* /*
* PWM driver system settings. * PWM driver system settings.