]> oss.titaniummirror.com Git - tinyos-2.x.git/blobdiff - tos/lib/safe/msp430/fail.c
Proper MSP_BSL_FLAGS for telosa and telosb based platforms using TMI modular tos...
[tinyos-2.x.git] / tos / lib / safe / msp430 / fail.c
index dabc72fac2ced3fde875a4970140d75cfa49c489..a1125c9dd3d7b3c1eab706676f8d9615070be471 100644 (file)
@@ -1,25 +1,33 @@
-static void led_off_0 (void) { 
-    __asm__ volatile ("bis.b #16, &0x0031"); 
+#undef SAFE_TINYOS
+
+static void led_off_0 (void) {
+    __asm__ volatile ("bis.b #16, &0x0031"); // telos
+    __asm__ volatile ("bis.b #1, &0x001D"); // shimmer
 }
 
 static void led_off_1 (void)  { 
-    __asm__ volatile ("bis.b #32, &0x0031"); 
+    __asm__ volatile ("bis.b #32, &0x0031"); // telos
+    __asm__ volatile ("bis.b #2, &0x001D"); // shimmer
 }
 
 static void led_off_2 (void)  {
-    __asm__ volatile ("bis.b #64, &0x0031"); 
+    __asm__ volatile ("bis.b #64, &0x0031"); // telos
+    __asm__ volatile ("bis.b #4, &0x001D"); // shimmer
 }
 
 static void led_on_0 (void) { 
-    __asm__ volatile ("bic.b #16, &0x0031"); 
+    __asm__ volatile ("bic.b #16, &0x0031"); // telos
+    __asm__ volatile ("bic.b #1, &0x001D"); // shimmer
 }
 
 static void led_on_1 (void) { 
-    __asm__ volatile ("bic.b #32, &0x0031"); 
+    __asm__ volatile ("bic.b #32, &0x0031"); // telos
+    __asm__ volatile ("bic.b #2, &0x001D"); // shimmer
 }
 
 static void led_on_2 (void) { 
-    __asm__ volatile ("bic.b #64, &0x0031"); 
+    __asm__ volatile ("bic.b #64, &0x0031"); // telos
+    __asm__ volatile ("bic.b #4, &0x001D"); // shimmer
 }
 
 static void delay (int len) 
@@ -122,7 +130,7 @@ static void display_int_flid (const unsigned int x)
 }
 
 // Not sure how to do this in Telosb without looking it up
-void deputy_fail_noreturn_fast (const char* file, int flid, const char* func)
+void deputy_fail_noreturn_fast (int flid)
 {
   // disable interrupts
   // set LEDS to output
@@ -133,18 +141,12 @@ void deputy_fail_noreturn_fast (const char* file, int flid, const char* func)
 
 }
 
-void deputy_fail_mayreturn(const char *check, const char *text,
-                           const char* file, int line, const char* func)
+void deputy_fail_mayreturn(int flid)
 {
-    // I don't think this has any meaning without FLID transformation
-    // FLID transformation stores FLID in line variable
-    deputy_fail_noreturn_fast(file, line, func);
+    deputy_fail_noreturn_fast(flid);
 }
 
-void deputy_fail_noreturn(const char *check, const char *text,
-                          const char* file, int line, const char* func)
+void deputy_fail_noreturn(int flid)
 {
-    // I don't think this has any meaning without FLID transformation
-    // FLID transformation stores FLID in line variable
-    deputy_fail_noreturn_fast(file, line, func);
+    deputy_fail_noreturn_fast(flid);
 }