Fix ARM delay function (#20901)

This commit is contained in:
X-Ryl669
2021-02-06 05:43:51 +01:00
committed by GitHub
parent 10aaab6350
commit 1c19af2c8f
11 changed files with 279 additions and 94 deletions

View File

@@ -57,17 +57,6 @@ uint16_t HAL_adc_result;
// Public functions
// ------------------------
// Needed for DELAY_NS() / DELAY_US() on CORTEX-M7
#if (defined(__arm__) || defined(__thumb__)) && __CORTEX_M == 7
// HAL pre-initialization task
// Force the preinit function to run between the premain() and main() function
// of the STM32 arduino core
__attribute__((constructor (102)))
void HAL_preinit() {
enableCycleCounter();
}
#endif
// HAL initialization task
void HAL_init() {
FastIO_init();