Rtos API example
Functions | |
void | wait (float s) |
Generic wait functions. | |
void | wait_ms (int ms) |
Waits a number of milliseconds. | |
void | wait_us (int us) |
Waits a number of microseconds. |
Function Documentation
void wait | ( | float | s ) |
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).
- Parameters:
-
s number of seconds to wait
Definition at line 24 of file mbed_wait_api_no_rtos.c.
void wait_ms | ( | int | ms ) |
Waits a number of milliseconds.
- Parameters:
-
ms the whole number of milliseconds to wait
Definition at line 28 of file mbed_wait_api_no_rtos.c.
void wait_us | ( | int | us ) |
Waits a number of microseconds.
- Parameters:
-
us the whole number of microseconds to wait
Definition at line 32 of file mbed_wait_api_no_rtos.c.
Generated on Sun Jul 17 2022 08:25:38 by 1.7.2