Delay¶
Functions
-
uint32_t
CurrentTick()¶ Current tick in sysclock ticks.
- Return
uint32_t
-
void
DelayUs(uint32_t us)¶ Delay routine in microseconds.
No need to check an overflow. Let it just tick :)
- Parameters
us: Number of microseconds to delay for
-
void
DelayMs(uint32_t ms)¶ Delay routine in milliseconds.
No need to check an overflow. Let it just tick :)
- Parameters
ms: Number of milliseconds to delay for
Example Usage:¶
while(1)
{
led1.Toggle();
DelayMs(100) // wait 100 milliseconds
led2.Toggle();
DelayUs(1000); // wait for 1000 microseconds
}