[Tinyos-help] ADCM$StartGet

Michael Schippling schip at santafe.edu
Sat Apr 21 12:56:35 PDT 2007


The only place I find TOSH_ADC_PORTMAPSIZE set to 255 is for the "pc"
platform. On other 'real' platforms it is 12 (12? I wonder why....)
So on the pc it's a useless test as written because "port" is a uint8_t
which can only range from 0 to 255, so if PORTMAPSIZE is 255 it doesn't
do anything. But on the other hand it doesn't hurt anything either.

MS

preeti k wrote:
> Hello,
>  
> I get the following warning when i compile my application.
>  
> C:/tinyos/cyg/opt/tinyos-1.x/tos/system/ADCM.nc: In function 
> `ADCM$startGet':
> C:/tinyos/cyg/opt/tinyos-1.x/tos/system/ADCM.nc:136: warning: comparison 
> is always false due to limited range of data type
>  
> I found a similar query on this mail archive but could not get a 
> solution to the above problem.
> How serious is this warning? I traced it to ADCM.nc in ADCMStartGet 
> function as follows
> ****
> if (port > TOSH_ADC_PORTMAPSIZE) {
>       return FAIL;
>     }
> ****
> TOSH_ADC_PORTMAPSIZE =255 is initialized
> What does it all mean?
> How do i rectify this warning?
>  
> Thanks in advance
> -Preeti
>  
>  
>  
>  
>  
>  
>  
>  
>  
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Tinyos-help mailing list
> Tinyos-help at Millennium.Berkeley.EDU
> https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help


More information about the Tinyos-help mailing list