api / mbed / trunk / wait_api
wait
Generic wait functions.
These provide simple NOP type wait capabilities.
Example
#include "mbed.h"
DigitalOut heartbeat(LED1);
int main() {
while (1) {
heartbeat = 1;
wait(0.5);
heartbeat = 0;
wait(0.5);
}
}Waits for a number of seconds, with microsecond resolution (within the accuracy of single precision floating point).
void wait( float s )
Waits a number of milliseconds.
void wait_ms( int ms )
Waits a number of microseconds.
void wait_us( int us )
