![]() |
no-OS
|
Implementation of iio_ad4080.c. More...
#include <errno.h>#include <stdbool.h>#include <stdint.h>#include <string.h>#include <assert.h>#include "no_os_alloc.h"#include "iio_ad4080.h"Macros | |
| #define | IIO_AD4080_CH_ATTR(_name, _priv) |
| #define | IIO_AD4080_GLOB_ATTR(_name, _priv) |
| #define | IIO_AD4080_GLOB_ATTR_AVAIL(_name, _priv) |
Typedefs | |
| typedef int(* | attr_fn) (struct iio_ad4080_desc *iio_ad4080, char *buf, uint32_t len, const struct iio_ch_info *ch_info, bool show) |
Functions | |
| void | iio_ad4080_fifo_unset_watermark (struct iio_ad4080_fifo_struct *fifo) |
| Unset the watermark configuration and data structure fors ad4080 driver. | |
| int | iio_ad4080_fifo_set_watermark (struct iio_ad4080_fifo_struct *fifo, const size_t watermark) |
| Sets the FIFO watermark for the AD4080 device. | |
| int | ad4080_device (struct iio_ad4080_desc *iio_ad4080, struct ad4080_dev **ad4080) |
| Gets the AD4080 device from the IIO AD4080 descriptor. | |
| int | ad4080_iio_device (struct iio_ad4080_desc *iio_ad4080, struct iio_device *iio_device) |
| Initializes the IIO device structure for the AD4080 device. | |
| int | iio_ad4080_init (struct iio_ad4080_desc **iio_ad4080, struct iio_ad4080_init_param *iio_ad4080_init_param) |
| Initializes the IIO AD4080 descriptor. | |
| void | iio_ad4080_fini (struct iio_ad4080_desc *iio_ad4080) |
| teardown the ad4080 IIO driver | |
Implementation of iio_ad4080.c.
Copyright 2025(c) Analog Devices, Inc.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
THIS SOFTWARE IS PROVIDED BY ANALOG DEVICES, INC. “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL ANALOG DEVICES, INC. BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
| #define IIO_AD4080_CH_ATTR | ( | _name, | |
| _priv ) |
| #define IIO_AD4080_GLOB_ATTR | ( | _name, | |
| _priv ) |
| #define IIO_AD4080_GLOB_ATTR_AVAIL | ( | _name, | |
| _priv ) |
| typedef int(* attr_fn) (struct iio_ad4080_desc *iio_ad4080, char *buf, uint32_t len, const struct iio_ch_info *ch_info, bool show) |
| anonymous enum |
| int ad4080_device | ( | struct iio_ad4080_desc * | iio_ad4080, |
| struct ad4080_dev ** | ad4080 ) |
Gets the AD4080 device from the IIO AD4080 descriptor.
Checks if the given pointer is a valid AD4080 IIO descriptor.
| iio_ad4080 | - The IIO AD4080 descriptor. |
| ad4080 | - Pointer to store the AD4080 device pointer. |
| int ad4080_iio_device | ( | struct iio_ad4080_desc * | iio_ad4080, |
| struct iio_device * | iio_device ) |
Initializes the IIO device structure for the AD4080 device.
| iio_ad4080 | - The IIO AD4080 descriptor. |
| iio_device | - The IIO device structure to be initialized. |
| int iio_ad4080_fifo_set_watermark | ( | struct iio_ad4080_fifo_struct * | fifo, |
| const size_t | watermark ) |
Sets the FIFO watermark for the AD4080 device.
| fifo | - Pointer to the IIO AD4080 FIFO structure. |
| watermark | - The desired watermark value (number of samples). |
| void iio_ad4080_fifo_unset_watermark | ( | struct iio_ad4080_fifo_struct * | fifo | ) |
Unset the watermark configuration and data structure fors ad4080 driver.
| fifo | - Pointer to the IIO AD4080 FIFO to unset. |
| void iio_ad4080_fini | ( | struct iio_ad4080_desc * | iio_ad4080 | ) |
teardown the ad4080 IIO driver
| int iio_ad4080_init | ( | struct iio_ad4080_desc ** | iio_ad4080, |
| struct iio_ad4080_init_param * | iio_ad4080_init_param ) |
Initializes the IIO AD4080 descriptor.
| iio_ad4080 | - Pointer to store the initialized IIO AD4080 descriptor. |
| iio_ad4080_init_param | - Initialization parameters for the IIO AD4080 descriptor. |