Contiki-Inga 3.x
soc-adc.h File Reference

Header file with register declarations for the cc2538 ADC and H/W RNG. More...

Go to the source code of this file.

Macros

ADC and RNG Register offset declarations
#define SOC_ADC_ADCCON1   0x400D7000
 ADC Control 1.
 
#define SOC_ADC_ADCCON2   0x400D7004
 ADC Control 2.
 
#define SOC_ADC_ADCCON3   0x400D7008
 ADC Control 3.
 
#define SOC_ADC_ADCL   0x400D700C
 ADC Result, least significant part.
 
#define SOC_ADC_ADCH   0x400D7010
 ADC Result, most significant part.
 
#define SOC_ADC_RNDL   0x400D7014
 RNG low byte.
 
#define SOC_ADC_RNDH   0x400D7018
 RNG high byte.
 
#define SOC_ADC_CMPCTL   0x400D7024
 Analog comparator control and status.
 
SOC_ADC_ADCCON1 register bit masks
#define SOC_ADC_ADCCON1_EOC   0x00000080
 End of conversion.
 
#define SOC_ADC_ADCCON1_ST   0x00000040
 Start conversion.
 
#define SOC_ADC_ADCCON1_STSEL   0x00000030
 Start select.
 
#define SOC_ADC_ADCCON1_RCTRL   0x0000000C
 Controls the 16-bit RNG.
 
#define SOC_ADC_ADCCON1_RCTRL1   0x00000008
 RCTRL high bit.
 
#define SOC_ADC_ADCCON1_RCTRL0   0x00000004
 RCTRL low bit.
 
SOC_ADC_ADCCON2 register bit masks
#define SOC_ADC_ADCCON2_SREF   0x000000C0
 Reference voltage for sequence.
 
#define SOC_ADC_ADCCON2_SDIV   0x00000030
 Decimation rate for sequence.
 
#define SOC_ADC_ADCCON2_SCH   0x0000000F
 Sequence channel select.
 
SOC_ADC_ADCCON3 register bit masks
#define SOC_ADC_ADCCON3_EREF   0x000000C0
 Reference voltage for extra.
 
#define SOC_ADC_ADCCON3_EDIV   0x00000030
 Decimation rate for extra.
 
#define SOC_ADC_ADCCON3_ECH   0x0000000F
 Single channel select.
 
SOC_ADC_ADC[L:H] register bit masks
#define SOC_ADC_ADCL_ADC   0x000000FC
 ADC Result, least significant part.
 
#define SOC_ADC_ADCH_ADC   0x000000FF
 ADC Result, most significant part.
 
SOC_ADC_RND[L:H] register bit masks
#define SOC_ADC_RNDL_RNDL   0x000000FF
 Random value/seed or CRC result low byte.
 
#define SOC_ADC_RNDH_RNDH   0x000000FF
 Random value or CRC result/input data, high byte.
 
SOC_ADC_CMPCTL register bit masks
#define SOC_ADC_CMPCTL_EN   0x00000002
 Comparator enable.
 
#define SOC_ADC_CMPCTL_OUTPUT   0x00000001
 Comparator output.
 

Detailed Description

Header file with register declarations for the cc2538 ADC and H/W RNG.

Definition in file soc-adc.h.