]> oss.titaniummirror.com Git - tinyos-2.x.git/blobdiff - tos/chips/msp430/pins/HplMsp430GeneralIOP.nc
Add getOut() and getOutRaw() methods. get() and getRaw() work off PORTxIN.
[tinyos-2.x.git] / tos / chips / msp430 / pins / HplMsp430GeneralIOP.nc
index 976eb5192c77ce3fbb6390f6a08f4e5c095aa7bd..78104ac31d9f8fd03a797449263f27a845109502 100644 (file)
@@ -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 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); }
@@ -57,4 +59,5 @@ implementation
   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; }
 }