3 #include "Driver_GPIO.h"
17 osStatus_t osDelay (uint32_t t)
19 uint32_t start = gTicks;
20 // modular subtraction is resillient against
21 // up to a single overflow in gTicks
22 while (gTicks - start < t)
29 SystemCoreClockUpdate();
30 SysTick_Config(SystemCoreClock / 1000);
31 NVIC_SetVector(SysTick_IRQn, (uintptr_t)tick);
32 NVIC_EnableIRQ(SysTick_IRQn);
34 RCC->AHB1ENR |= RCC_AHB1ENR_GPIOAEN;