#include #ifdef STA_HAL_DELAY_ENABLE #include namespace sta { void delayMs(uint32_t ms) { HAL_Delay(ms); } } // namespace sta #ifdef STA_HAL_DELAY_US_TIM #include namespace sta { void delayUs(uint32_t us) { __HAL_TIM_SET_COUNTER(&STA_HAL_DELAY_US_TIM, 0); while (__HAL_TIM_GET_COUNTER(&STA_HAL_DELAY_US_TIM) < us); } } // namespace sta #endif // STA_HAL_DELAY_US_TIM #endif // STA_HAL_DELAY_ENABLE