shinnosuke hanamura / Mbed 2 deprecated test5

Dependencies:   mbed

Files at this revision

API Documentation at this revision

Comitter:
hanashin
Date:
Mon Apr 21 07:42:11 2014 +0000
Parent:
0:5193eafa81b6
Commit message:
a

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/main.cpp	Fri Apr 11 10:50:46 2014 +0000
+++ b/main.cpp	Mon Apr 21 07:42:11 2014 +0000
@@ -2,23 +2,28 @@
 
 BusOut leds(P1_13, P1_14, P1_22, P0_17, P0_18, P0_19, P1_15, P0_1);
 
-void rotate();
+void all();
 
 int main()
 {
 
     while(1)
     {
-        rotate();    
+        all();    
     }
 }
     
-void rotate()
-{
-    volatile uint8_t i;
+void all()
+    {
+        leds = 0xff;
+        wait(0.125);
+        leds = 0; 
+        wait(0.125);
+        volatile uint8_t i;
     for(i = 0x00; i < 8; i++)
     {
         leds = 1 << i;
         wait(0.125);
     }
-}
\ No newline at end of file
+        
+    }