Loading...
Searching...
No Matches
analog_util.h File Reference

Analog utility function interfaces. More...

Detailed Description

Analog utility function interfaces.

Author
Hauke Petersen hauke.nosp@m..pet.nosp@m.ersen.nosp@m.@fu-.nosp@m.berli.nosp@m.n.de

Definition in file analog_util.h.

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

Go to the source code of this file.

Functions

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.
 
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)
 
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.
 
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.