42 #include "lib/sensors.h"
57 return 25000 + ((raw >> 4) - 1422) * 10000 / 42;
64 configure(
int type,
int value)
75 SENSORS_SENSOR(cc2538_temp_sensor, TEMP_SENSOR, value, configure, status);
#define CC2538_SENSORS_ERROR
Generic Error.
#define SOC_ADC_ADCCON_REF_INT
Internal reference.
#define CC2538_SENSORS_VALUE_TYPE_CONVERTED
Request the converted reading.
#define CC2538_SENSORS_VALUE_TYPE_RAW
Request the raw reading.
int16_t adc_get(uint8_t channel, uint8_t ref, uint8_t div)
Performs a single conversion on a given ADC channel.
Generic header usable by all CC2538 sensor drivers.
#define SOC_ADC_ADCCON_CH_TEMP
Temperature sensor.
#define SOC_ADC_ADCCON_DIV_512
512 decimation rate (12 bits ENOB)