The official Mbed 2 C/C++ SDK provides the software platform and libraries to build your applications.

Dependents:   hello SerialTestv11 SerialTestv12 Sierpinski ... more

mbed 2

This is the mbed 2 library. If you'd like to learn about Mbed OS please see the mbed-os docs.

Revision:
171:3a7713b1edbc
Parent:
165:d1b4690b3f8b
Child:
172:65be27845400
--- a/drivers/Timer.h	Thu Sep 06 13:39:34 2018 +0100
+++ b/drivers/Timer.h	Thu Nov 08 11:45:42 2018 +0000
@@ -30,7 +30,7 @@
  *
  * Example:
  * @code
- * // Count the time to toggle a LED
+ * // Count the time to toggle an LED
  *
  * #include "mbed.h"
  *
@@ -65,7 +65,7 @@
 
     /** Reset the timer to 0.
      *
-     * If it was already counting, it will continue
+     * If it was already running, it will continue
      */
     void reset();
 
@@ -75,15 +75,15 @@
      */
     float read();
 
-    /** Get the time passed in milli-seconds
+    /** Get the time passed in milliseconds
      *
-     *  @returns    Time passed in milli seconds
+     *  @returns    Time passed in milliseconds
      */
     int read_ms();
 
-    /** Get the time passed in micro-seconds
+    /** Get the time passed in microseconds
      *
-     *  @returns    Time passed in micro seconds
+     *  @returns    Time passed in microseconds
      */
     int read_us();
 
@@ -91,18 +91,21 @@
      */
     operator float();
 
-    /** Get in a high resolution type the time passed in micro-seconds.
+    /** Get in a high resolution type the time passed in microseconds.
+     *  Returns a 64 bit integer.
      */
     us_timestamp_t read_high_resolution_us();
 
+#if !defined(DOXYGEN_ONLY)
 protected:
     us_timestamp_t slicetime();
     int _running;            // whether the timer is running
     us_timestamp_t _start;   // the start time of the latest slice
     us_timestamp_t _time;    // any accumulated time from previous slices
     const ticker_data_t *_ticker_data;
-    bool _lock_deepsleep;    // flag which indicates if deep-sleep should be disabled
+    bool _lock_deepsleep;    // flag that indicates if deep sleep should be disabled
 };
+#endif
 
 } // namespace mbed