[Tinyos-2-commits] CVS: tinyos-2.x/tos/chips/msp430/pins HplMsp430GeneralIOP.nc, 1.3, 1.4

John Regehr regehr at users.sourceforge.net
Sat Feb 16 12:03:53 PST 2008


Update of /cvsroot/tinyos/tinyos-2.x/tos/chips/msp430/pins
In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv31644/pins

Modified Files:
	HplMsp430GeneralIOP.nc 
Log Message:
trusted casts for safe tinyos on MSP430 register accesses

Index: HplMsp430GeneralIOP.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/tos/chips/msp430/pins/HplMsp430GeneralIOP.nc,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** HplMsp430GeneralIOP.nc	7 Nov 2006 19:31:02 -0000	1.3
--- HplMsp430GeneralIOP.nc	16 Feb 2008 20:03:51 -0000	1.4
***************
*** 38,45 ****
  implementation
  {
!   #define PORTxIN (*(volatile TYPE_PORT_IN*)port_in_addr)
!   #define PORTx (*(volatile TYPE_PORT_OUT*)port_out_addr)
!   #define PORTxDIR (*(volatile TYPE_PORT_DIR*)port_dir_addr)
!   #define PORTxSEL (*(volatile TYPE_PORT_SEL*)port_sel_addr)
  
    async command void IO.set() { atomic PORTx |= (0x01 << pin); }
--- 38,45 ----
  implementation
  {
!   #define PORTxIN (*TCAST(volatile TYPE_PORT_IN* SINGLE NONNULL, port_in_addr))
!   #define PORTx (*TCAST(volatile TYPE_PORT_OUT* SINGLE NONNULL, port_out_addr))
!   #define PORTxDIR (*TCAST(volatile TYPE_PORT_DIR* SINGLE NONNULL, port_dir_addr))
!   #define PORTxSEL (*TCAST(volatile TYPE_PORT_SEL* SINGLE NONNULL, port_sel_addr))
  
    async command void IO.set() { atomic PORTx |= (0x01 << pin); }



More information about the Tinyos-2-commits mailing list