Ref::Delay

Leo Selavo edited this page Jan 13, 2016 · 1 revision

Delay is used when busy- waiting is acceptable. busy waiting means that the CPU is busy while the wait, just looping around, but not letting any other useful work done. Delay is easy to program and recommended for the beginners, but wasteful on compute resources.

For a simple example using a delay to wait for some time between blinking a LED, look at the Blink application description - or at: MansOS/apps/demo/Blink

Location

Delay function is available at mos/include/delay.h

Functions

Wait for a number of mili- or microseconds. The availability and precision depends on the platform.

void udelay(uint16_t microseconds)
void mdelay(uint16_t miliseconds)
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.