X-Git-Url: https://oss.titaniummirror.com/gitweb/?p=tinyos-2.x.git;a=blobdiff_plain;f=tos%2Fchips%2Fmsp430%2Fpins%2FHplMsp430GeneralIOP.nc;h=191d4f21b9d631f3b60fd1dc6f7699849b10d000;hp=38f6f4b576a15bd7f6c06c85353774fd4d7486b4;hb=48666eab550362c629ba4dcb7d107b9d44b9ba6c;hpb=da0fc4a07b170b5c2c4b1ead622701be794a4de6 diff --git a/tos/chips/msp430/pins/HplMsp430GeneralIOP.nc b/tos/chips/msp430/pins/HplMsp430GeneralIOP.nc index 38f6f4b5..191d4f21 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 (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<