[Tinyos-2-commits] CVS: tinyos-2.x/tos/chips/msp430/pins
HplMsp430GeneralIO.nc, 1.1.2.2, 1.1.2.3 HplMsp430GeneralIOP.nc,
1.1.2.3, 1.1.2.4 Msp430GpioC.nc, 1.1.2.2, 1.1.2.3
Jonathan Hui
jwhui at users.sourceforge.net
Thu Sep 28 12:57:10 PDT 2006
Update of /cvsroot/tinyos/tinyos-2.x/tos/chips/msp430/pins
In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv10355/chips/msp430/pins
Modified Files:
Tag: tinyos-2_0_devel-BRANCH
HplMsp430GeneralIO.nc HplMsp430GeneralIOP.nc Msp430GpioC.nc
Log Message:
Updates to include isInput() and isOutput()
Index: HplMsp430GeneralIO.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/tos/chips/msp430/pins/HplMsp430GeneralIO.nc,v
retrieving revision 1.1.2.2
retrieving revision 1.1.2.3
diff -C2 -d -r1.1.2.2 -r1.1.2.3
*** HplMsp430GeneralIO.nc 19 Jun 2006 11:12:23 -0000 1.1.2.2
--- HplMsp430GeneralIO.nc 28 Sep 2006 19:57:07 -0000 1.1.2.3
***************
*** 64,81 ****
async command void makeInput();
/**
* Set pin direction to output.
*/
async command void makeOutput();
!
/**
* Set pin for module specific functionality.
*/
async command void selectModuleFunc();
!
/**
* Set pin for I/O functionality.
*/
async command void selectIOFunc();
}
--- 64,89 ----
async command void makeInput();
+ async command bool isInput();
+
/**
* Set pin direction to output.
*/
async command void makeOutput();
!
! async command bool isOutput();
!
/**
* Set pin for module specific functionality.
*/
async command void selectModuleFunc();
!
! async command bool isModuleFunc();
!
/**
* Set pin for I/O functionality.
*/
async command void selectIOFunc();
+
+ async command bool isIOFunc();
}
Index: HplMsp430GeneralIOP.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/tos/chips/msp430/pins/HplMsp430GeneralIOP.nc,v
retrieving revision 1.1.2.3
retrieving revision 1.1.2.4
diff -C2 -d -r1.1.2.3 -r1.1.2.4
*** HplMsp430GeneralIOP.nc 19 Jun 2006 11:12:23 -0000 1.1.2.3
--- HplMsp430GeneralIOP.nc 28 Sep 2006 19:57:07 -0000 1.1.2.4
***************
*** 49,54 ****
--- 49,58 ----
async command bool IO.get() { return (call IO.getRaw() != 0); }
async command void IO.makeInput() { atomic PORTxDIR &= ~(0x01 << pin); }
+ async command bool IO.isInput() { return (PORTxDIR & (0x01 << pin)) == 0; }
async command void IO.makeOutput() { atomic PORTxDIR |= (0x01 << pin); }
+ async command bool IO.isOutput() { return (PORTxDIR & (0x01 << pin)) != 0; }
async command void IO.selectModuleFunc() { atomic PORTxSEL |= (0x01 << pin); }
+ 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; }
}
Index: Msp430GpioC.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/tos/chips/msp430/pins/Msp430GpioC.nc,v
retrieving revision 1.1.2.2
retrieving revision 1.1.2.3
diff -C2 -d -r1.1.2.2 -r1.1.2.3
*** Msp430GpioC.nc 19 Jun 2006 11:12:23 -0000 1.1.2.2
--- Msp430GpioC.nc 28 Sep 2006 19:57:07 -0000 1.1.2.3
***************
*** 40,44 ****
--- 40,46 ----
async command bool GeneralIO.get() { return call HplGeneralIO.get(); }
async command void GeneralIO.makeInput() { call HplGeneralIO.makeInput(); }
+ async command bool GeneralIO.isInput() { return call HplGeneralIO.isInput(); }
async command void GeneralIO.makeOutput() { call HplGeneralIO.makeOutput(); }
+ async command bool GeneralIO.isOutput() { return call HplGeneralIO.isOutput(); }
}
More information about the Tinyos-2-commits
mailing list