Example code displaying how to use and implement the mbed RTOS along with a simple state machine used to capture button presses.

Dependencies:   mbed

Fork of mbed-rtos by mbed official

Revision:
31:015df9e602b6
Parent:
8:88a1a9c26ae3
--- a/rtos/RtosTimer.h	Tue May 27 08:30:16 2014 +0100
+++ b/rtos/RtosTimer.h	Tue Jun 03 11:30:14 2014 +0100
@@ -32,7 +32,7 @@
  periodic timers are possible. A timer can be started, restarted, or stopped.
 
  Timers are handled in the thread osTimerThread.
- Callback functions run under control of this thread and may use CMSIS-RTOS API calls. 
+ Callback functions run under control of this thread and may use CMSIS-RTOS API calls.
 */
 class RtosTimer {
 public:
@@ -44,18 +44,18 @@
     RtosTimer(void (*task)(void const *argument),
           os_timer_type type=osTimerPeriodic,
           void *argument=NULL);
-    
+
     /** Stop the timer.
-      @return  status code that indicates the execution status of the function. 
+      @return  status code that indicates the execution status of the function.
     */
     osStatus stop(void);
-    
+
     /** start a timer.
       @param   millisec  time delay value of the timer.
-      @return  status code that indicates the execution status of the function. 
+      @return  status code that indicates the execution status of the function.
     */
     osStatus start(uint32_t millisec);
-    
+
     ~RtosTimer();
 
 private: