analog_util.h File Reference

Analog utility function interfaces. More...

Detailed Description

Analog utility function interfaces.

Hauke Petersen

Definition in file analog_util.h.

#include "periph/adc.h"
+ Include dependency graph for analog_util.h:

Go to the source code of this file.


int adc_util_map (int sample, adc_res_t res, int min, int max)
 Map a sampled ADC value to a given range. More...
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 arithmetics) More...
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. More...
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. More...