refactor(boot): move BT and rotary encoder init to board specifics (#7265)
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.6
parent
ac4c4d7b6b
commit
559866c059
@@ -23,18 +23,12 @@
|
||||
|
||||
#include "hal/usb_driver.h"
|
||||
#include "hal/abnormal_reboot.h"
|
||||
#include "hal/rotary_encoder.h"
|
||||
|
||||
#include "board.h"
|
||||
#include "debug.h"
|
||||
|
||||
#include "timers_driver.h"
|
||||
|
||||
#if defined(BLUETOOTH)
|
||||
#include "bluetooth_driver.h"
|
||||
#include "stm32_serial_driver.h"
|
||||
#endif
|
||||
|
||||
#if defined(DEBUG_SEGGER_RTT)
|
||||
#include "thirdparty/Segger/SEGGER/SEGGER_RTT.h"
|
||||
#endif
|
||||
@@ -107,26 +101,12 @@ void bootloaderInitApp()
|
||||
#endif
|
||||
}
|
||||
|
||||
// TODO: move all this into board specifics
|
||||
pwrOn();
|
||||
|
||||
#if defined(ROTARY_ENCODER_NAVIGATION) && !defined(USE_HATS_AS_KEYS)
|
||||
rotaryEncoderInit();
|
||||
#endif
|
||||
|
||||
__enable_irq();
|
||||
|
||||
TRACE("\nBootloader started :)");
|
||||
|
||||
// TODO: move BT into board specifics
|
||||
#if defined(BLUETOOTH)
|
||||
// we shutdown the bluetooth module now to be sure it will be detected on
|
||||
// firmware start
|
||||
bluetoothInit(BLUETOOTH_DEFAULT_BAUDRATE, false);
|
||||
#endif
|
||||
|
||||
timersInit();
|
||||
|
||||
usbInit();
|
||||
boardBLInit();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user