Contiki 3.x
|
Driver for the cc2538 ADC controller. More...
Files | |
file | adc.c |
Implementation of the cc2538 ADC driver. | |
file | adc.h |
Header file for the cc2538 ADC driver. | |
ADC functions | |
void | adc_init (void) |
Initializes the ADC controller. | |
int16_t | adc_get (uint8_t channel, uint8_t ref, uint8_t div) |
Performs a single conversion on a given ADC channel. More... | |
Driver for the cc2538 ADC controller.
int16_t adc_get | ( | uint8_t | channel, |
uint8_t | ref, | ||
uint8_t | div | ||
) |
Performs a single conversion on a given ADC channel.
channel | The channel used for the conversion: SOC_ADC_ADCCON_CH_x |
ref | The reference voltage used for the conversion: SOC_ADC_ADCCON_REF_x |
div | The decimation rate used for the conversion: SOC_ADC_ADCCON_DIV_x |
Definition at line 57 of file adc.c.
References CCTEST_TR0, CCTEST_TR0_ADCTM, RFCORE_XREG_ATEST, RFCORE_XREG_ATEST_ATEST_CTRL, RFCORE_XREG_ATEST_ATEST_CTRL_TEMP, SOC_ADC_ADCCON1, SOC_ADC_ADCCON1_EOC, SOC_ADC_ADCCON3, SOC_ADC_ADCCON3_ECH, SOC_ADC_ADCCON3_EDIV, SOC_ADC_ADCCON3_EREF, SOC_ADC_ADCCON_CH_TEMP, SOC_ADC_ADCH, and SOC_ADC_ADCL.