X-Git-Url: https://oss.titaniummirror.com/gitweb/?a=blobdiff_plain;f=tos%2Fchips%2Fmsp430%2Fpins%2FHplMsp430GeneralIOP.nc;h=78104ac31d9f8fd03a797449263f27a845109502;hb=5d1185472b58034d288d276aa6a3d079099671c4;hp=976eb5192c77ce3fbb6390f6a08f4e5c095aa7bd;hpb=10acc57d16a648d746eed9d5c6264850f7c52fde;p=tinyos-2.x.git diff --git a/tos/chips/msp430/pins/HplMsp430GeneralIOP.nc b/tos/chips/msp430/pins/HplMsp430GeneralIOP.nc index 976eb519..78104ac3 100644 --- a/tos/chips/msp430/pins/HplMsp430GeneralIOP.nc +++ b/tos/chips/msp430/pins/HplMsp430GeneralIOP.nc @@ -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<