57 adc_get(uint8_t channel, uint8_t ref, uint8_t div)
59 uint32_t cctest_tr0, rfcore_xreg_atest;
Header with declarations of the RF Core XREGs.
#define SOC_ADC_ADCCON1_EOC
End of conversion.
#define SOC_ADC_ADCL
ADC Result, least significant part.
#define CCTEST_TR0_ADCTM
Connect temperature sensor to ADC.
#define SOC_ADC_ADCCON1_STSEL
Start select.
#define SOC_ADC_ADCH
ADC Result, most significant part.
#define SOC_ADC_ADCCON3_ECH
Single channel select.
#define RFCORE_XREG_ATEST
Analog test control.
#define RFCORE_XREG_ATEST_ATEST_CTRL_TEMP
Analog test mode: enable temperature sensor.
Header file with register manipulation macro definitions.
Header with declarations of CCTEST module registers.
#define SOC_ADC_ADCCON3_EREF
Reference voltage for extra.
#define SOC_ADC_ADCCON3_EDIV
Decimation rate for extra.
Header file with register declarations for the cc2538 ADC and H/W RNG.
#define CCTEST_TR0
Test register 0.
#define SOC_ADC_ADCCON1
ADC Control 1.
int16_t adc_get(uint8_t channel, uint8_t ref, uint8_t div)
Performs a single conversion on a given ADC channel.
#define RFCORE_XREG_ATEST_ATEST_CTRL
Controls the analog test mode.
#define SOC_ADC_ADCCON3
ADC Control 3.
void adc_init(void)
Initializes the ADC controller.
#define SOC_ADC_ADCCON_CH_TEMP
Temperature sensor.