Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
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 20 of file mbed_wait_api_stub.cpp.
void wait_ms | ( | int | ms ) |
Waits a number of milliseconds.
- Parameters:
-
ms the whole number of milliseconds to wait
Definition at line 23 of file mbed_wait_api_stub.cpp.
void wait_us | ( | int | us ) |
Waits a number of microseconds.
- Parameters:
-
us the whole number of microseconds to wait
Definition at line 26 of file mbed_wait_api_stub.cpp.
Generated on Tue Jul 12 2022 14:26:26 by
