]> oss.titaniummirror.com Git - tinyos-2.x.git/blobdiff - tos/chips/atm128/pins/HplAtm128InterruptPinP.nc
Make McuSleepC smarter about newer msp430 processors.
[tinyos-2.x.git] / tos / chips / atm128 / pins / HplAtm128InterruptPinP.nc
index ce4aa83572044d75fd18ed5b0960246dd969dbf6..3f94f56f13004a40025a2ac561c26e16b165435f 100644 (file)
@@ -30,7 +30,7 @@
 generic module HplAtm128InterruptPinP (uint8_t ctrl_addr, 
                                 uint8_t edge0bit, 
                                 uint8_t edge1bit, 
-                                uint8_t bit)
+                                uint8_t bit) @safe()
 {
   provides interface HplAtm128Interrupt as Irq;
   uses interface HplAtm128InterruptSig as IrqSignal;
@@ -42,7 +42,7 @@ implementation
   inline async command void Irq.enable()   { EIMSK |= 1 << bit; }
   inline async command void Irq.disable()  { EIMSK &= ~(1 << bit); }
 
-#define ctrl  (*(volatile uint8_t *)ctrl_addr)
+#define ctrl  (*TCAST(volatile uint8_t * ONE, ctrl_addr))
 
   inline async command void Irq.edge(bool low_to_high) {
     ctrl |= 1 << edge1bit; // use edge mode