feat: better microsecond timer (#4112)
This commit is contained in:
@@ -107,10 +107,7 @@ void boardInit()
|
||||
AUDIO_RCC_APB1Periph |
|
||||
BACKLIGHT_RCC_APB1Periph |
|
||||
HAPTIC_RCC_APB1Periph |
|
||||
INTERRUPT_xMS_RCC_APB1Periph |
|
||||
TIMER_2MHz_RCC_APB1Periph |
|
||||
TELEMETRY_RCC_APB1Periph |
|
||||
MIXER_SCHEDULER_TIMER_RCC_APB1Periph |
|
||||
BT_RCC_APB1Periph,
|
||||
ENABLE);
|
||||
|
||||
@@ -224,8 +221,7 @@ void boardInit()
|
||||
|
||||
lcdInit(); // delaysInit() must be called before
|
||||
audioInit();
|
||||
init2MhzTimer();
|
||||
init1msTimer();
|
||||
timersInit();
|
||||
usbInit();
|
||||
|
||||
#if defined(DEBUG)
|
||||
|
||||
@@ -2800,20 +2800,12 @@
|
||||
#define BT_RCC_APB2Periph 0
|
||||
#endif
|
||||
|
||||
// Xms Interrupt
|
||||
#define INTERRUPT_xMS_RCC_APB1Periph RCC_APB1Periph_TIM14
|
||||
#define INTERRUPT_xMS_TIMER TIM14
|
||||
#define INTERRUPT_xMS_IRQn TIM8_TRG_COM_TIM14_IRQn
|
||||
#define INTERRUPT_xMS_IRQHandler TIM8_TRG_COM_TIM14_IRQHandler
|
||||
|
||||
// 2MHz Timer
|
||||
#define TIMER_2MHz_RCC_APB1Periph RCC_APB1Periph_TIM7
|
||||
#define TIMER_2MHz_TIMER TIM7
|
||||
#define TIMER_2MHz_IRQn TIM7_IRQn
|
||||
#define TIMER_2MHz_IRQHandler TIM7_IRQHandler
|
||||
// Millisecond timer
|
||||
#define MS_TIMER TIM14
|
||||
#define MS_TIMER_IRQn TIM8_TRG_COM_TIM14_IRQn
|
||||
#define MS_TIMER_IRQHandler TIM8_TRG_COM_TIM14_IRQHandler
|
||||
|
||||
// Mixer scheduler timer
|
||||
#define MIXER_SCHEDULER_TIMER_RCC_APB1Periph RCC_APB1Periph_TIM12
|
||||
#define MIXER_SCHEDULER_TIMER TIM12
|
||||
#define MIXER_SCHEDULER_TIMER_FREQ (PERI1_FREQUENCY * TIMER_MULT_APB1)
|
||||
#define MIXER_SCHEDULER_TIMER_IRQn TIM8_BRK_TIM12_IRQn
|
||||
|
||||
Reference in New Issue
Block a user