| 
    Zephyr Project API
    3.4.0
    
   A Scalable Open Source RTOS 
   | 
 
DAC driver APIs. More...
Data Structures | |
| struct | dac_channel_cfg | 
| Structure for specifying the configuration of a DAC channel.  More... | |
Functions | |
| int | dac_channel_setup (const struct device *dev, const struct dac_channel_cfg *channel_cfg) | 
| Configure a DAC channel.  More... | |
| int | dac_write_value (const struct device *dev, uint8_t channel, uint32_t value) | 
| Write a single value to a DAC channel.  More... | |
DAC driver APIs.
| int dac_channel_setup | ( | const struct device * | dev, | 
| const struct dac_channel_cfg * | channel_cfg | ||
| ) | 
#include <include/zephyr/drivers/dac.h>
Configure a DAC channel.
It is required to call this function and configure each channel before it is selected for a write request.
| dev | Pointer to the device structure for the driver instance. | 
| channel_cfg | Channel configuration. | 
| 0 | On success. | 
| -EINVAL | If a parameter with an invalid value has been provided. | 
| -ENOTSUP | If the requested resolution is not supported. | 
#include <include/zephyr/drivers/dac.h>
Write a single value to a DAC channel.
| dev | Pointer to the device structure for the driver instance. | 
| channel | Number of the channel to be used. | 
| value | Data to be written to DAC output registers. | 
| 0 | On success. | 
| -EINVAL | If a parameter with an invalid value has been provided. |