commit-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Commit-gnuradio] r6769 - gnuradio/branches/developers/matt/u2f/firmware


From: eb
Subject: [Commit-gnuradio] r6769 - gnuradio/branches/developers/matt/u2f/firmware
Date: Wed, 31 Oct 2007 23:19:13 -0600 (MDT)

Author: eb
Date: 2007-10-31 23:19:13 -0600 (Wed, 31 Oct 2007)
New Revision: 6769

Modified:
   gnuradio/branches/developers/matt/u2f/firmware/blink_leds2.c
Log:
work-in-progress

Modified: gnuradio/branches/developers/matt/u2f/firmware/blink_leds2.c
===================================================================
--- gnuradio/branches/developers/matt/u2f/firmware/blink_leds2.c        
2007-11-01 05:16:47 UTC (rev 6768)
+++ gnuradio/branches/developers/matt/u2f/firmware/blink_leds2.c        
2007-11-01 05:19:13 UTC (rev 6769)
@@ -32,7 +32,8 @@
 // #define DELTA_T  50000000           // 0.5s (10ns per tick)
 #define DELTA_T  500                   // 5 us (10ns per tick)
 
-static int led_state = 0;
+static int led_state_1 = 0;
+static int led_state_2 = 0;
 
 void
 timer_handler(unsigned irq)
@@ -41,8 +42,7 @@
   int t = timer_regs->time;
   timer_regs->time = t + DELTA_T;
 
-  led_state ^= 0x2;
-  output_regs->leds = led_state;
+  led_state_2 ^= 0x2;
 }
 
 int
@@ -57,8 +57,8 @@
   timer_regs->time = t + DELTA_T;
 
   while(1){
-    led_state ^= 0x1;
-    output_regs->leds = led_state;
+    led_state_1 ^= 0x1;
+    output_regs->leds = led_state_1 | led_state_2;
   }
 
   return 0;





reply via email to

[Prev in Thread] Current Thread [Next in Thread]