uint16_t dac_util_mapf(float value, float min, float max)
Helper function to map a given float value range to a valid DAC value.
uint16_t dac_util_map(int value, int min, int max)
Map a value out of the given range to a 16-bit unsigned int.
int32_t adc_util_map(int sample, adc_res_t res, int32_t min, int32_t max)
Map a sampled ADC value to a given range.
adc_res_t
Possible ADC resolution settings.
Low-level ADC peripheral driver interface definitions.
float adc_util_mapf(int sample, adc_res_t res, float min, float max)
Map a sampled ADC value to a given range (using floating point arithmetic)