Zephyr API Documentation  2.7.0-rc2
A Scalable Open Source RTOS
adc_emul.h File Reference

Backend API for emulated ADC. More...

#include <zephyr/types.h>
#include <drivers/adc.h>

Go to the source code of this file.

Typedefs

typedef int(* adc_emul_value_func) (const struct device *dev, unsigned int chan, void *data, uint32_t *result)
 Type definition of the function which is used to obtain ADC mV input values. More...
 

Functions

int adc_emul_const_value_set (const struct device *dev, unsigned int chan, uint32_t value)
 Set constant mV value input for emulated ADC chan. More...
 
int adc_emul_value_func_set (const struct device *dev, unsigned int chan, adc_emul_value_func func, void *data)
 Set function used to obtain voltage for input of emulated ADC chan. More...
 
int adc_emul_ref_voltage_set (const struct device *dev, enum adc_reference ref, uint16_t value)
 Set reference voltage. More...
 

Detailed Description

Backend API for emulated ADC.