Delay#

Basic delay functionality.

Simple delay routines for use with components that require small delays.

Functions#

void
delay_microseconds(uint32_t usecs)

Delay for a number of microseconds.

void

Initialize the delay driver's millisecond counter.

void
delay_milliseconds(uint32_t msecs, bool blocking)

Delay for a number of milliseconds.

bool

Check whether the current delay has expired.

Function Documentation#

delay_microseconds#

void delay_microseconds (uint32_t usecs)

Delay for a number of microseconds.

Parameters
N/Ausecs

Number of microseconds to delay

Note

  • This function can be used without calling delay_init() first. This is not an accurate microsecond delay and can have a delay greater than expected, of about +50%. This error becomes significant for lower values delay.


Definition at line 44 of file platform/bootloader/driver/btl_driver_delay.h

delay_init#

void delay_init (void)

Initialize the delay driver's millisecond counter.

Parameters
N/A

Definition at line 49 of file platform/bootloader/driver/btl_driver_delay.h

delay_milliseconds#

void delay_milliseconds (uint32_t msecs, bool blocking)

Delay for a number of milliseconds.

Parameters
N/Amsecs

Number of milliseconds to delay. The number should stay within a single TIMER0 overflow (approx. 3300 ms).

N/Ablocking

Whether to block until the delay has expired. If false, the delay_expired() function can be called to check whether the delay has expired.


Definition at line 60 of file platform/bootloader/driver/btl_driver_delay.h

delay_expired#

bool delay_expired (void)

Check whether the current delay has expired.

Parameters
N/A

Returns

  • True if the delay has expired.


Definition at line 67 of file platform/bootloader/driver/btl_driver_delay.h