1 #ifndef RUUVI_TASK_ADC_H
2 #define RUUVI_TASK_ADC_H
195 const uint8_t handle,
float *
const sample);
212 const uint8_t handle,
float *
const sample);
uint32_t rd_status_t
bitfield for representing errors
rd_status_t rt_adc_vdd_get(float *const vdd)
Get VDD.
rd_status_t rt_adc_configure_se(rd_sensor_configuration_t *const config, const uint8_t handle, const rt_adc_mode_t mode)
Configure ADC before sampling.
rd_status_t rt_adc_init(void)
Reserve ADC.
rd_status_t rt_adc_absolute_sample(rd_sensor_configuration_t *const configuration, const uint8_t handle, float *const sample)
Get absolute Voltage Sample from selected ADC handle.
rd_status_t rt_adc_vdd_prepare(rd_sensor_configuration_t *const vdd_adc_configuration)
Prepare for sampling VDD.
rd_status_t rt_adc_ratiometric_sample(rd_sensor_configuration_t *const configuration, const uint8_t handle, float *const sample)
Get ratiometric VDD Sample from selected ADC handle.
rd_status_t rt_adc_uninit(void)
Uninitialize ADC to release it for other users.
rd_status_t rt_adc_sample(void)
Take a new sample on ADC configured in single-shot/sleep mode.
rd_status_t rt_adc_ratio_get(rd_sensor_data_t *const data)
Populate data with latest ratiometric value.
bool rt_adc_is_init(void)
Check if ADC is initialized.
rd_status_t rt_adc_voltage_get(rd_sensor_data_t *const data)
Populate data with latest sample.
rd_status_t rt_adc_vdd_sample(void)
Sample VDD.
@ RATIOMETRIC
ADC compares value to VDD.
@ ABSOLUTE
ADC measures absolute voltage in volts.
Ruuvi error codes and error check function.
Ruuvi sensor interface Lifecycle: Beta
All sensors must implement configuration functions which accept this struct.
Generic sensor data struct.