]> oss.titaniummirror.com Git - tinyos-2.x.git/commitdiff
safe tinyos annotations
authorregehr <regehr>
Sat, 16 Feb 2008 05:30:24 +0000 (05:30 +0000)
committerregehr <regehr>
Sat, 16 Feb 2008 05:30:24 +0000 (05:30 +0000)
tos/chips/atm128/pins/HplAtm128GeneralIOPinP.nc
tos/chips/atm128/pins/HplAtm128GeneralIOSlowPinP.nc

index febbb1d1feb57806e333c1529a065347fafb1dab..e8bc4668610cdb829d9a128ab76f91485e407efc 100644 (file)
@@ -38,9 +38,9 @@ generic module HplAtm128GeneralIOPinP (uint8_t port_addr,
 }
 implementation
 {
-#define pin (*(volatile uint8_t *)pin_addr)
-#define port (*(volatile uint8_t *)port_addr)
-#define ddr (*(volatile uint8_t *)ddr_addr)
+#define pin (*TCAST(volatile uint8_t * SINGLE NONNULL, pin_addr))
+#define port (*TCAST(volatile uint8_t * SINGLE NONNULL, port_addr))
+#define ddr (*TCAST(volatile uint8_t * SINGLE NONNULL, ddr_addr))
 
   inline async command bool IO.get()        { return READ_BIT (pin, bit); }
   inline async command void IO.set()        { SET_BIT  (port, bit); }
index 2d6115e69ce3ea1448e5cd3d2d777f8c08bf526e..692f17c77311887af6bafecb28c747899d9fb0c7 100644 (file)
@@ -39,9 +39,9 @@ generic module HplAtm128GeneralIOSlowPinP (uint8_t port_addr,
 }
 implementation
 {
-#define pin (*(volatile uint8_t *)pin_addr)
-#define port (*(volatile uint8_t *)port_addr)
-#define ddr (*(volatile uint8_t *)ddr_addr)
+#define pin (*TCAST(volatile uint8_t * SINGLE NONNULL, pin_addr))
+#define port (*TCAST(volatile uint8_t * SINGLE NONNULL, port_addr))
+#define ddr (*TCAST(volatile uint8_t * SINGLE NONNULL, ddr_addr))
 
   inline async command bool IO.get()        { return READ_BIT (pin, bit); }
   inline async command void IO.set()        { atomic SET_BIT  (port, bit); }