mirror of
https://git.intern.spaceteamaachen.de/ALPAKA/sta-core.git
synced 2025-08-06 18:37:34 +00:00
added a delay check and updated README
This commit is contained in:
@@ -62,10 +62,11 @@ namespace sta
|
||||
return (updateFreq >= 1000000);
|
||||
}
|
||||
|
||||
void delayUs(uint32_t us)
|
||||
void delayUs(uint16_t us)
|
||||
{
|
||||
// Check if the specified timer is usable for microsecond delays.
|
||||
STA_ASSERT(isValidDelayUsTIM());
|
||||
STA_ASSERT(us < 1000);
|
||||
|
||||
__HAL_TIM_SET_COUNTER(&STA_STM32_DELAY_US_TIM, 0);
|
||||
while (__HAL_TIM_GET_COUNTER(&STA_STM32_DELAY_US_TIM) < us * gDelayUsMul);
|
||||
|
Reference in New Issue
Block a user