RTOS homework 4

Dependencies:   C12832_lcd mbed

Revision:
15:7c0a94d2a439
Parent:
14:fb4c76ac43a1
Child:
16:d7bbd641929c
--- a/main.cpp	Sun Aug 18 19:02:25 2013 +0000
+++ b/main.cpp	Sun Aug 18 19:08:29 2013 +0000
@@ -32,8 +32,8 @@
 
 -----includes-----------------------------------//----------------------------*/
     #include "mbed.h"                           // mbed class.
+//  #include "rtos.h"
     #include "C12832_lcd.h"                     // LCD class.
-    #include "rtos.h"
 //---defines------------------------------------//------------------------------
     #define LCD1 lcd.locate(0, 0);              // LCD line 1.
     #define LCD2 lcd.locate(0,11);              // LCD line 2.
@@ -89,7 +89,6 @@
     void ISR_left_falling();
     void ISR_center();
     void turn_off_metronome();
-    void thread_start_display(void const *);
 //==============================================//==============================
     int main(void) 
     {
@@ -107,11 +106,10 @@
       initialization();
       
                                                       // metronome ticker.
-//      tickerMetronome.attach(&interrupt_service_M,fMetroDelay);
+      tickerMetronome.attach(&interrupt_service_M,fMetroDelay);
       
-      Thread threadDisplay(thread_start_display);
-      
-  
+                                                // LCD ticker.
+      tickerLCD.attach(&lcd_display,LCDSAMPLERATE);  
       
       while(1)
       {
@@ -302,12 +300,4 @@
     void led3_off(void) {led3 = 0;}             // turn off the LED.
 /*----------------------------------------------//----------------------------*/
     void led3_on( void) {led3 = 1;}             // turn on the led.
-/*----------------------------------------------//----------------------------*/
-    void thread_start_display(void const *)
-    {
-                                                    // LCD ticker.
-      tickerLCD.attach(&lcd_display,LCDSAMPLERATE);
-    
-    }
-/*----------------------------------------------//----------------------------*/
- 
\ No newline at end of file
+/*----------------------------------------------//----------------------------*/
\ No newline at end of file