Macros | |
#define | ADC_USE_STANDBY (0) |
#define | WAIT_ADC_SYNC() while(ADC->STATUS.reg & ADC_STATUS_SYNCBUSY) |
Functions | |
static uint16_t | adc_get_value (void) |
static int8_t | get_analog_pin (sensor_result_t *res) |
static int8_t | get_io_supply (sensor_result_t *res) |
int8_t | get_sensor_value (sensor_type_t sensor, sensor_result_t *res) |
static int8_t | get_temperature (sensor_result_t *res) |
static void | samr21_adc_init (sensor_type_t sensor) |
#define ADC_USE_STANDBY (0) |
#define WAIT_ADC_SYNC | ( | ) | while(ADC->STATUS.reg & ADC_STATUS_SYNCBUSY) |
Referenced by adc_get_value(), and samr21_adc_init().
|
static |
References cpu_irq_enable, system_set_sleepmode(), system_sleep(), SYSTEM_SLEEPMODE_STANDBY, and WAIT_ADC_SYNC.
Referenced by get_analog_pin(), get_io_supply(), get_temperature(), and samr21_adc_init().
|
static |
References adc_get_value(), ADC_OVERRUN, sensor_result_tag::adc_value, ANALOG_PIN, sensor_result_tag::error, samr21_adc_init(), sensor_result_tag::sensor_value, SUCCESS, and sensor_result_tag::unit.
Referenced by get_sensor_value().
|
static |
References adc_get_value(), ADC_OVERRUN, sensor_result_tag::adc_value, sensor_result_tag::error, IO_SUPPLY, samr21_adc_init(), sensor_result_tag::sensor_value, SUCCESS, and sensor_result_tag::unit.
Referenced by get_sensor_value().
int8_t get_sensor_value | ( | sensor_type_t | sensor, |
sensor_result_t * | res | ||
) |
References ANALOG_PIN, get_analog_pin(), get_io_supply(), get_temperature(), IO_SUPPLY, ret, and TEMPERATURE.
Referenced by PROCESS_THREAD().
|
static |
References adc_get_value(), ADC_OVERRUN, sensor_result_tag::adc_value, sensor_result_tag::error, samr21_adc_init(), sensor_result_tag::sensor_value, SUCCESS, TEMPERATURE, and sensor_result_tag::unit.
Referenced by get_sensor_value().
|
static |
References adc_get_value(), ANALOG_PIN, IO_SUPPLY, TEMPERATURE, and WAIT_ADC_SYNC.
Referenced by get_analog_pin(), get_io_supply(), and get_temperature().