Source file of the IIO AD74413r Driver.
More...
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include "no_os_error.h"
#include "no_os_units.h"
#include "no_os_util.h"
#include "no_os_alloc.h"
#include "ad74413r.h"
#include "iio_ad74413r.h"
Source file of the IIO AD74413r Driver.
- Author
- Ciprian Regus (cipri.nosp@m.an.r.nosp@m.egus@.nosp@m.anal.nosp@m.og.co.nosp@m.m)
Copyright 2022(c) Analog Devices, Inc.
SPDX-License-Identifier: BSD-3-Clause
◆ _AD74413R_CHANNELS
| #define _AD74413R_CHANNELS |
( |
| _channels | ) |
|
Value: { \
.channels = _channels, \
}
#define NO_OS_ARRAY_SIZE(x)
Definition no_os_util.h:27
◆ AD74413R_ADC_CHANNEL
| #define AD74413R_ADC_CHANNEL |
( |
| type, |
|
|
| attrs ) |
Value: { \
.ch_type = type, \
.indexed = 1, \
.ch_out = 0, \
.scan_type = &ad74413r_iio_adc_scan_type, \
.attributes = attrs \
}
◆ AD74413R_CHANNELS
| #define AD74413R_CHANNELS |
( |
| name | ) |
|
Value:
#define _AD74413R_CHANNELS(_channels)
Definition iio_ad74413r.c:49
◆ AD74413R_DAC_CHANNEL
| #define AD74413R_DAC_CHANNEL |
( |
| type | ) |
|
Value: { \
.ch_type = type, \
.indexed = 1, \
.ch_out = 1, \
.attributes = ad74413r_iio_dac_attrs, \
}
◆ AD74413R_DIAG_CHANNEL
| #define AD74413R_DIAG_CHANNEL |
( |
| _addr, |
|
|
| _type ) |
Value: { \
.ch_type = _type, \
.indexed = 1, \
.ch_out = 0, \
.channel = _addr, \
.address = _addr - 4, \
.scan_type = &ad74413r_iio_adc_scan_type, \
.attributes = ad74413r_iio_adc_diag_attrs \
}
◆ channel_type
| Enumerator |
|---|
| AD74413R_ADC | |
| AD74413R_DIAG | |
◆ ad74413r_iio_init()
Initializes the AD74413R IIO descriptor.
- Parameters
-
| iio_desc | - The iio device descriptor. |
| init_param | - The structure that contains the device initial parameters. |
- Returns
- 0 in case of success, an error code otherwise.
◆ ad74413r_iio_remove()
Free an iio descriptor.
- Parameters
-
| desc | - The descriptor to be freed. |
- Returns
- 0 in case of success, an error code otherwise.