enabling TIM8 ICU
This commit is contained in:
parent
cc466ad3ef
commit
d575ffe5c1
|
@ -244,7 +244,7 @@
|
||||||
#define STM32_ICU_USE_TIM3 TRUE
|
#define STM32_ICU_USE_TIM3 TRUE
|
||||||
#define STM32_ICU_USE_TIM4 FALSE
|
#define STM32_ICU_USE_TIM4 FALSE
|
||||||
#define STM32_ICU_USE_TIM5 FALSE
|
#define STM32_ICU_USE_TIM5 FALSE
|
||||||
#define STM32_ICU_USE_TIM8 FALSE
|
#define STM32_ICU_USE_TIM8 TRUE
|
||||||
#define STM32_ICU_USE_TIM9 TRUE
|
#define STM32_ICU_USE_TIM9 TRUE
|
||||||
#define STM32_ICU_TIM1_IRQ_PRIORITY ICU_PRIORITY
|
#define STM32_ICU_TIM1_IRQ_PRIORITY ICU_PRIORITY
|
||||||
#define STM32_ICU_TIM2_IRQ_PRIORITY ICU_PRIORITY
|
#define STM32_ICU_TIM2_IRQ_PRIORITY ICU_PRIORITY
|
||||||
|
|
|
@ -255,7 +255,7 @@
|
||||||
#define STM32_ICU_USE_TIM3 TRUE
|
#define STM32_ICU_USE_TIM3 TRUE
|
||||||
#define STM32_ICU_USE_TIM4 FALSE
|
#define STM32_ICU_USE_TIM4 FALSE
|
||||||
#define STM32_ICU_USE_TIM5 FALSE
|
#define STM32_ICU_USE_TIM5 FALSE
|
||||||
#define STM32_ICU_USE_TIM8 FALSE
|
#define STM32_ICU_USE_TIM8 TRUE
|
||||||
#define STM32_ICU_USE_TIM9 TRUE
|
#define STM32_ICU_USE_TIM9 TRUE
|
||||||
#define STM32_ICU_TIM1_IRQ_PRIORITY ICU_PRIORITY
|
#define STM32_ICU_TIM1_IRQ_PRIORITY ICU_PRIORITY
|
||||||
#define STM32_ICU_TIM2_IRQ_PRIORITY ICU_PRIORITY
|
#define STM32_ICU_TIM2_IRQ_PRIORITY ICU_PRIORITY
|
||||||
|
|
|
@ -103,6 +103,11 @@ static uint32_t getAlternateFunctions(ICUDriver *driver) {
|
||||||
return GPIO_AF_TIM4;
|
return GPIO_AF_TIM4;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
#if STM32_ICU_USE_TIM8
|
||||||
|
if (driver == &ICUD8) {
|
||||||
|
return GPIO_AF_TIM8;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
#if STM32_ICU_USE_TIM9
|
#if STM32_ICU_USE_TIM9
|
||||||
if (driver == &ICUD9) {
|
if (driver == &ICUD9) {
|
||||||
return GPIO_AF_TIM9;
|
return GPIO_AF_TIM9;
|
||||||
|
|
|
@ -2,10 +2,10 @@
|
||||||
* @file mpu_util.h
|
* @file mpu_util.h
|
||||||
*
|
*
|
||||||
* @date Jul 27, 2014
|
* @date Jul 27, 2014
|
||||||
* @author Andrey Belomutskiy, (c) 2012-2017
|
* @author Andrey Belomutskiy, (c) 2012-2019
|
||||||
*/
|
*/
|
||||||
#ifndef MPU_UTIL_H_
|
|
||||||
#define MPU_UTIL_H_
|
#pragma once
|
||||||
|
|
||||||
#include "stm32f4xx_hal_flash_ex.h"
|
#include "stm32f4xx_hal_flash_ex.h"
|
||||||
#include "stm32_common_mpu_util.h"
|
#include "stm32_common_mpu_util.h"
|
||||||
|
@ -34,6 +34,10 @@
|
||||||
#define GPIO_AF_TIM5 2
|
#define GPIO_AF_TIM5 2
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef GPIO_AF_TIM8
|
||||||
|
#define GPIO_AF_TIM8 3
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifndef GPIO_AF_TIM9
|
#ifndef GPIO_AF_TIM9
|
||||||
#define GPIO_AF_TIM9 3
|
#define GPIO_AF_TIM9 3
|
||||||
#endif
|
#endif
|
||||||
|
@ -73,7 +77,6 @@ void HardFaultVector(void);
|
||||||
}
|
}
|
||||||
#endif /* __cplusplus */
|
#endif /* __cplusplus */
|
||||||
|
|
||||||
#endif /* MPU_UTIL_H_ */
|
|
||||||
|
|
||||||
#if HAL_USE_SPI
|
#if HAL_USE_SPI
|
||||||
void initSpiModule(SPIDriver *driver, brain_pin_e sck, brain_pin_e miso,
|
void initSpiModule(SPIDriver *driver, brain_pin_e sck, brain_pin_e miso,
|
||||||
|
|
|
@ -2,10 +2,10 @@
|
||||||
* @file mpu_util.h
|
* @file mpu_util.h
|
||||||
*
|
*
|
||||||
* @date Jul 27, 2014
|
* @date Jul 27, 2014
|
||||||
* @author Andrey Belomutskiy, (c) 2012-2017
|
* @author Andrey Belomutskiy, (c) 2012-2019
|
||||||
*/
|
*/
|
||||||
#ifndef MPU_UTIL_H_
|
|
||||||
#define MPU_UTIL_H_
|
#pragma once
|
||||||
|
|
||||||
#include "stm32f7xx_hal_flash_ex.h"
|
#include "stm32f7xx_hal_flash_ex.h"
|
||||||
#include "stm32_common_mpu_util.h"
|
#include "stm32_common_mpu_util.h"
|
||||||
|
@ -35,6 +35,10 @@
|
||||||
#define GPIO_AF_TIM5 2
|
#define GPIO_AF_TIM5 2
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef GPIO_AF_TIM8
|
||||||
|
#define GPIO_AF_TIM8 3
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifndef GPIO_AF_TIM9
|
#ifndef GPIO_AF_TIM9
|
||||||
#define GPIO_AF_TIM9 3
|
#define GPIO_AF_TIM9 3
|
||||||
#endif
|
#endif
|
||||||
|
@ -76,7 +80,6 @@ void HardFaultVector(void);
|
||||||
}
|
}
|
||||||
#endif /* __cplusplus */
|
#endif /* __cplusplus */
|
||||||
|
|
||||||
#endif /* MPU_UTIL_H_ */
|
|
||||||
|
|
||||||
#if HAL_USE_SPI
|
#if HAL_USE_SPI
|
||||||
void initSpiModule(SPIDriver *driver, brain_pin_e sck, brain_pin_e miso,
|
void initSpiModule(SPIDriver *driver, brain_pin_e sck, brain_pin_e miso,
|
||||||
|
|
Loading…
Reference in New Issue