HAL/LL: Generic EXTI & trainer driver

Changes:
- generic EXTI driver
- generic trainer driver
- relocated rotary encoder timer (simple 100us delay) from TIM4 to TIM12
- taranis & horus use now TIM4 for trainer pulses
- serial driver handles periph clocks for UARTs

TODO:
- SBUS on heartbeat pin (USART or soft-serial)
This commit is contained in:
Raphael Coeffic
2022-12-10 13:37:31 +01:00
committed by Raphael Coeffic
parent d4cd3d0ddf
commit 042d5091f2
32 changed files with 896 additions and 1082 deletions
+2 -9
View File
@@ -23,6 +23,7 @@
#include "hal/adc_driver.h"
#include "hal/serial_driver.h"
#include "hal/serial_port.h"
#include "hal/trainer_driver.h"
#include "board.h"
#include "timers_driver.h"
@@ -133,13 +134,8 @@ void boardInit()
#if defined(RADIO_FAMILY_T16)
FLYSKY_HALL_RCC_APB1Periph |
#endif
AUX_SERIAL_RCC_APB1Periph |
AUX2_SERIAL_RCC_APB1Periph |
TELEMETRY_RCC_APB1Periph |
TRAINER_RCC_APB1Periph |
AUDIO_RCC_APB1Periph |
INTMODULE_RCC_APB1Periph |
EXTMODULE_RCC_APB1Periph |
MIXER_SCHEDULER_TIMER_RCC_APB1Periph |
BACKLIGHT_RCC_APB1Periph,
ENABLE);
@@ -148,12 +144,8 @@ void boardInit()
LCD_RCC_APB2Periph |
ADC_RCC_APB2Periph |
HAPTIC_RCC_APB2Periph |
INTMODULE_RCC_APB2Periph |
EXTMODULE_RCC_APB2Periph |
TELEMETRY_RCC_APB2Periph |
BT_RCC_APB2Periph |
AUX_SERIAL_RCC_APB2Periph |
AUX2_SERIAL_RCC_APB2Periph |
BACKLIGHT_RCC_APB2Periph,
ENABLE);
@@ -168,6 +160,7 @@ void boardInit()
#endif
pwrInit();
init_trainer();
pwrOn();
delaysInit();