The interrupt vectors are defined in:
    /usr/local/avr/include/avr/iom128.h
but the numbers are off-by-one for some reason.
TWI and TWO_WIRE are there too...although I had
some trouble following your question's path
from ADC to there...

Other interesting tidbits can be found in the
compiler header files as well.

MS


James Millar wrote:
> Hello,
> 
>  
> 
> I know the snippet of code below in Tinyos 1.x 
> /tos/platform/atm1281/HPLADCM.nc is marked for being registered as an 
> interrupt.  I’m trying to understand how the software knows to run this 
> piece of code when the ADC Conversion is complete.  The ADC part of 
> SIG_ADC is listed in the Atmel 1281 datasheet (pg 106) as the name of 
> the interrupt vector that signals a conversion is complete, however, 
> when I search source code info on the TWI interrupt vector, there is no 
> SIG_TWI in the nesc code, but instead SIG_2WIRE_SERIAL, and nothing to 
> map 2WIRE_SERIAL to TWI. 
> 
>  
> 
> So how does TOSH_SIGNAL(SIG_ADC) get associated with the ADC conversion 
> complete interrupt vector?  Which file has this information?  I’m just 
> teaching myself by walking through sample code.
> 
>  
> 
>   TOSH_SIGNAL(SIG_ADC) {
> 
>     uint16_t data = inw(ADCL);
> 
>     data &= 0x3ff;
> 
>     sbi(ADCSRA, ADIF);
> 
>     cbi(ADCSRA, ADEN);
> 
>     __nesc_enable_interrupt();
> 
>     signal ADC.dataReady(data);
> 
>   }
> 
>  
> 
> -James
> 
>  
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Tinyos-help mailing list
> [email protected]
> https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to