|
|
@ -81,7 +81,9 @@ void HAL_init() {
|
|
|
|
|
|
|
|
|
|
|
|
SetTimerInterruptPriorities();
|
|
|
|
SetTimerInterruptPriorities();
|
|
|
|
|
|
|
|
|
|
|
|
TERN_(EMERGENCY_PARSER, USB_Hook_init());
|
|
|
|
#if ENABLED(EMERGENCY_PARSER) && USBD_USE_CDC
|
|
|
|
|
|
|
|
USB_Hook_init();
|
|
|
|
|
|
|
|
#endif
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void HAL_clear_reset_source() { __HAL_RCC_CLEAR_RESET_FLAGS(); }
|
|
|
|
void HAL_clear_reset_source() { __HAL_RCC_CLEAR_RESET_FLAGS(); }
|
|
|
@ -128,8 +130,12 @@ uint16_t HAL_adc_get_result() { return HAL_adc_result; }
|
|
|
|
void flashFirmware(const int16_t) { NVIC_SystemReset(); }
|
|
|
|
void flashFirmware(const int16_t) { NVIC_SystemReset(); }
|
|
|
|
|
|
|
|
|
|
|
|
// Maple Compatibility
|
|
|
|
// Maple Compatibility
|
|
|
|
|
|
|
|
volatile uint32_t systick_uptime_millis = 0;
|
|
|
|
systickCallback_t systick_user_callback;
|
|
|
|
systickCallback_t systick_user_callback;
|
|
|
|
void systick_attach_callback(systickCallback_t cb) { systick_user_callback = cb; }
|
|
|
|
void systick_attach_callback(systickCallback_t cb) { systick_user_callback = cb; }
|
|
|
|
void HAL_SYSTICK_Callback() { if (systick_user_callback) systick_user_callback(); }
|
|
|
|
void HAL_SYSTICK_Callback() {
|
|
|
|
|
|
|
|
systick_uptime_millis++;
|
|
|
|
|
|
|
|
if (systick_user_callback) systick_user_callback();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
#endif // ARDUINO_ARCH_STM32 && !STM32GENERIC
|
|
|
|
#endif // ARDUINO_ARCH_STM32 && !STM32GENERIC
|
|
|
|