Mike Moore / Mbed 2 deprecated RTOS_LAB_08_problem_2

Dependencies:   mbed

Revision:
0:07602282e53c
Child:
1:cc6f7a7e1b38
diff -r 000000000000 -r 07602282e53c main.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Fri Sep 06 03:42:11 2013 +0000
@@ -0,0 +1,32 @@
+
+    void delay(void);
+    
+    #define FIO2DIR0 (*(volatile unsigned char *) (0x2009C040))
+    #define FIO2PIN0 (*(volatile unsigned char *) (0x2009C054))
+//==============================================//==============================  
+    int main()
+    {
+      FIO2DIR0=0xFF;                            // set port 2.  lowest byte to output.          
+      while (1)
+      {
+        FIO2PINO |= 0x01;                       // OR bit 0 with 1 to set pin high.
+        delay();
+        FIO2PIN) &= ~0x01;                      // AND bit 0 with 0 to set pin low.
+        delay();
+      }                                         // while (1)  
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    }                                           // main.
\ No newline at end of file