]> oss.titaniummirror.com Git - tinyos-2.x.git/blobdiff - tos/chips/msp430/pins/HplMsp430GeneralIOP.nc
Support for newer msp430's using newer msp430 compiler.
[tinyos-2.x.git] / tos / chips / msp430 / pins / HplMsp430GeneralIOP.nc
index 34debff46c7205c3aeb8089096bbbf50e101343e..191d4f21b9d631f3b60fd1dc6f7699849b10d000 100644 (file)
@@ -31,7 +31,7 @@ generic module HplMsp430GeneralIOP(
                                uint8_t port_dir_addr,
                                uint8_t port_sel_addr,
                                uint8_t pin
-                               )
+                               ) @safe()
 {
   provides interface HplMsp430GeneralIO as IO;
 }
@@ -45,6 +45,8 @@ implementation
   async command void IO.set() { atomic PORTx |= (0x01 << pin); }
   async command void IO.clr() { atomic PORTx &= ~(0x01 << pin); }
   async command void IO.toggle() { atomic PORTx ^= (0x01 << pin); }
+  async command uint8_t IO.getOutRaw() { return PORTx & (0x01 << pin); }
+  async command bool IO.getOut() { return (call IO.getOutRaw() != 0); }
   async command uint8_t IO.getRaw() { return PORTxIN & (0x01 << pin); }
   async command bool IO.get() { return (call IO.getRaw() != 0); }
   async command void IO.makeInput() { atomic PORTxDIR &= ~(0x01 << pin); }
@@ -55,4 +57,7 @@ implementation
   async command bool IO.isModuleFunc() { return (PORTxSEL & (0x01<<pin)) != 0; }
   async command void IO.selectIOFunc() { atomic PORTxSEL &= ~(0x01 << pin); }
   async command bool IO.isIOFunc() { return (PORTxSEL & (0x01<<pin)) == 0; }
+  async command void IO.enableRen() {}
+  async command void IO.disableRen() {}
+  async command bool IO.isRen() { return FALSE; }
 }