42 #include "lib/sensors.h" 58 return raw * (3 * 1190) / (2047 << 4);
65 configure(
int type,
int value)
76 SENSORS_SENSOR(
vdd3_sensor, VDD3_SENSOR, value, configure, status);
const struct sensors_sensor vdd3_sensor
Exports global symbols for the sensor API.
#define CC2538_SENSORS_VALUE_TYPE_CONVERTED
Request the converted reading.
#define SOC_ADC_ADCCON_DIV_512
512 decimation rate (12 bits ENOB)
#define CC2538_SENSORS_ERROR
Generic Error.
Generic header usable by all CC2538 sensor drivers.
#define CC2538_SENSORS_VALUE_TYPE_RAW
Request the raw reading.
Header file for the cc2538 ADC driver.
#define SOC_ADC_ADCCON_CH_VDD_3
VDD/3.
#define SOC_ADC_ADCCON_REF_INT
Internal reference.
Header file for the CC2538 VDD3 Sensor Driver.
int16_t adc_get(uint8_t channel, uint8_t ref, uint8_t div)
Performs a single conversion on a given ADC channel.