mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-18 22:05:17 +03:00
Remove need for IRQ to be provided in target.c
This commit is contained in:
parent
dc5b0a64bd
commit
159236093e
6 changed files with 80 additions and 48 deletions
|
@ -81,6 +81,7 @@ typedef struct timerOvrHandlerRec_s {
|
|||
typedef struct timerDef_s {
|
||||
TIM_TypeDef *TIMx;
|
||||
rccPeriphTag_t rcc;
|
||||
uint8_t inputIrq;
|
||||
} timerDef_t;
|
||||
|
||||
typedef struct timerHardware_s {
|
||||
|
@ -121,6 +122,8 @@ typedef enum {
|
|||
#endif
|
||||
#elif defined(STM32F3)
|
||||
#define HARDWARE_TIMER_DEFINITION_COUNT 10
|
||||
#elif defined(STM32F411xE)
|
||||
#define HARDWARE_TIMER_DEFINITION_COUNT 10
|
||||
#elif defined(STM32F4)
|
||||
#define HARDWARE_TIMER_DEFINITION_COUNT 14
|
||||
#elif defined(STM32F7)
|
||||
|
@ -167,7 +170,7 @@ void timerChITConfigDualLo(const timerHardware_t* timHw, FunctionalState newStat
|
|||
void timerChITConfig(const timerHardware_t* timHw, FunctionalState newState);
|
||||
void timerChClearCCFlag(const timerHardware_t* timHw);
|
||||
|
||||
void timerChInit(const timerHardware_t *timHw, channelType_t type, int irqPriority);
|
||||
void timerChInit(const timerHardware_t *timHw, channelType_t type, int irqPriority, uint8_t irq);
|
||||
|
||||
void timerInit(void);
|
||||
void timerStart(void);
|
||||
|
@ -178,6 +181,7 @@ uint8_t timerClockDivisor(TIM_TypeDef *tim);
|
|||
void configTimeBase(TIM_TypeDef *tim, uint16_t period, uint8_t mhz); // TODO - just for migration
|
||||
|
||||
rccPeriphTag_t timerRCC(TIM_TypeDef *tim);
|
||||
uint8_t timerInputIrq(TIM_TypeDef *tim);
|
||||
|
||||
const timerHardware_t *timerGetByTag(ioTag_t tag, timerUsageFlag_e flag);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue