[Tinyos-2-commits] CVS: tinyos-2.x/tos/chips/msp430/adc12 HplAdc12.nc, 1.4, 1.5

Kevin Klues klueska at users.sourceforge.net
Thu May 22 10:45:05 PDT 2008


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

Modified Files:
	HplAdc12.nc 
Log Message:
Change parameter name to idx instead of index for compatibility with nesC 1.3.  In nesC 1.3, parameter names are no longer renamed in interfaces, and 'index' is an illegal parameter name because it shadows the *built-in* definition of index from gcc.  This has been fixed in newer versions of gcc, but the msp430-gcc we use (and have to use) is pretty old.  Moral of the story.... don't use index as a paramter name.

Index: HplAdc12.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/tos/chips/msp430/adc12/HplAdc12.nc,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** HplAdc12.nc	12 Dec 2006 18:23:07 -0000	1.4
--- HplAdc12.nc	22 May 2008 17:45:00 -0000	1.5
***************
*** 70,91 ****
    /** 
     * Sets the ADC12 conversion memory control register ADC12MCTLx.
!    * @param index The register index (the 'x' in ADC12MCTLx) [0..15] 
     * @param memControl ADC12MCTLx register data.
     */
!   async command void setMCtl(uint8_t index, adc12memctl_t memControl); 
    
    /** 
     * Returns the ADC12 conversion memory control register ADC12MCTLx.
!    * @param index The register index (the 'x' in ADC12MCTLx) [0..15] 
     * @return memControl ADC12MCTLx register data.
     */
!   async command adc12memctl_t getMCtl(uint8_t index); 
  
    /** 
     * Returns the ADC12 conversion memory register ADC12MEMx.
!    * @param index The register index (the 'x' in ADC12MEMx) [0..15] 
     * @return ADC12MEMx 
     */  
!   async command uint16_t getMem(uint8_t index); 
  
    /** 
--- 70,91 ----
    /** 
     * Sets the ADC12 conversion memory control register ADC12MCTLx.
!    * @param idx The register index (the 'x' in ADC12MCTLx) [0..15] 
     * @param memControl ADC12MCTLx register data.
     */
!   async command void setMCtl(uint8_t idx, adc12memctl_t memControl); 
    
    /** 
     * Returns the ADC12 conversion memory control register ADC12MCTLx.
!    * @param idx The register index (the 'x' in ADC12MCTLx) [0..15] 
     * @return memControl ADC12MCTLx register data.
     */
!   async command adc12memctl_t getMCtl(uint8_t idx); 
  
    /** 
     * Returns the ADC12 conversion memory register ADC12MEMx.
!    * @param idx The register index (the 'x' in ADC12MEMx) [0..15] 
     * @return ADC12MEMx 
     */  
!   async command uint16_t getMem(uint8_t idx); 
  
    /** 



More information about the Tinyos-2-commits mailing list