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.
Dependents: cc3000_ping_demo_try_2
Fork of mbed by
Diff: wait_api.h
- Revision:
- 20:029aa53d7323
- Parent:
- 11:1c1ebd0324fa
- Child:
- 27:7110ebee3484
--- a/wait_api.h Tue May 18 16:04:21 2010 +0000
+++ b/wait_api.h Thu Jun 03 11:17:50 2010 +0000
@@ -1,3 +1,23 @@
+/* Title: 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);
+ * > }
+ * > }
+ */
+
/* mbed Microcontroller Library - wait_api
* Copyright (c) 2009 ARM Limited. All rights reserved.
* sford
@@ -12,8 +32,29 @@
extern "C" {
#endif
+/* Function: wait
+ * Waits for a number of seconds, with microsecond resolution (within
+ * the accuracy of single precision floating point).
+ *
+ * Variables:
+ * s - number of seconds to wait
+ */
void wait(float s);
+
+/* Function: wait_ms
+ * Waits a number of milliseconds.
+ *
+ * Variables:
+ * ms - the whole number of milliseconds to wait
+ */
void wait_ms(int ms);
+
+/* Function: wait_us
+ * Waits a number of microseconds.
+ *
+ * Variables:
+ * us - the whole number of microseconds to wait
+ */
void wait_us(int us);
#ifdef __cplusplus
