Make it blink with D7 and D8
[rapper.git] / new_cmsis / main.c
index 2c70737..efd10ef 100644 (file)
@@ -46,7 +46,7 @@ __inline static void Delay (uint32_t dlyTicks) {
  *------------------------------------------------------------------------------*/\r
 __inline static void LED_Config(void) {\r
 \r
-  GPIO1->FIODIR = 0xB0000000;                   /* LEDs PORT1 are Output */\r
+  GPIO1->FIODIR = (1<<29)|(1<<18);     /* LEDs on PORT1 18 & 29 are Output */\r
 }\r
 \r
 /*------------------------------------------------------------------------------\r
@@ -79,9 +79,13 @@ int main (void) {
   LED_Config();                             \r
  \r
   while(1) {\r
-    LED_On ((1<<28));                           /* Turn on the LED. */\r
+    LED_On ((1<<29));                           /* Turn on the LED. */\r
+    LED_On ((1<<18));                           /* Turn on the LED. */\r
     Delay (100);                                /* delay  100 Msec */\r
-    LED_Off ((1<<28));                             /* Turn off the LED. */\r
+    LED_Off ((1<<29));                           /* Turn on the LED. */\r
+    Delay (100);                                /* delay  100 Msec */\r
+    LED_Off ((1<<18));                           /* Turn on the LED. */\r
+    LED_On ((1<<29));                           /* Turn on the LED. */\r
     Delay (100);                                /* delay  100 Msec */\r
   }\r
   \r