Implementation of iio_axi_dac. Instantiates iio_axi_adc and iio_axi_dac devices, for reading/writing and parameterization.
More...
#include <string.h>
#include <inttypes.h>
#include <stdio.h>
#include <stdlib.h>
#include "no_os_error.h"
#include "no_os_alloc.h"
#include "iio.h"
#include "iio_axi_dac.h"
Implementation of iio_axi_dac. Instantiates iio_axi_adc and iio_axi_dac devices, for reading/writing and parameterization.
- Author
- Cristian Pop (crist.nosp@m.ian..nosp@m.pop@a.nosp@m.nalo.nosp@m.g.com)
Copyright 2019(c) Analog Devices, Inc.
SPDX-License-Identifier: BSD-3-Clause
◆ STORAGE_BITS
◆ ch_type
| Enumerator |
|---|
| CH_VOLTGE | |
| CH_ALTVOLTGE | |
◆ iio_axi_dac_get_dev_descriptor()
Create structure describing a device, channels and attributes.
- Parameters
-
| desc | - Descriptor. |
| dev_descriptor | - device descriptor. |
◆ iio_axi_dac_init()
Registers a iio_axi_dac_desc for reading/writing and parameterization of axi_dac device.
- Parameters
-
| desc | - Descriptor. |
| init | - Configuration structure. |
- Returns
- 0 in case of success, -1 otherwise.
◆ iio_axi_dac_prepare_transfer()
| int iio_axi_dac_prepare_transfer |
( |
void * | dev, |
|
|
uint32_t | mask ) |
Update active channels.
- Parameters
-
| dev | - Instance of the iio_axi_dac |
| mask | - Mask with new channels to activate |
- Returns
- axi_dac_update_active_channels result.
◆ iio_axi_dac_remove()
Release resources.
- Parameters
-
- Returns
- 0 in case of success, -1 otherwise.
◆ iio_axi_dac_write_data()
| int iio_axi_dac_write_data |
( |
void * | dev, |
|
|
void * | buff, |
|
|
uint32_t | nb_samples ) |
Update active channels.
- Parameters
-
| dev | - Instance of the iio_axi_dac |
| buff | - Buffer where to read samples |
| nb_samples | - Number of samples |
- Returns
- 0 in case of success or negative value otherwise.