no-OS
All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
swiot.h
Go to the documentation of this file.
1/***************************************************************************/
33#ifndef IIO_SWIOT_H
34#define IIO_SWIOT_H
35
36#include <stdbool.h>
37#include "no_os_gpio.h"
38#include "ad74413r.h"
39#include "iio_ad74413r.h"
40#include "max14906.h"
41#include "iio_max14906.h"
42#include "adin1110.h"
43
44#define SWIOT_CHANNELS 4
45
46static const char *const ad74413r_function_available[] = {
47 [AD74413R_HIGH_Z] = "high_z",
48 [AD74413R_VOLTAGE_OUT] = "voltage_out",
49 [AD74413R_CURRENT_OUT] = "current_out",
50 [AD74413R_VOLTAGE_IN] = "voltage_in",
51 [AD74413R_CURRENT_IN_EXT] = "current_in_ext",
52 [AD74413R_CURRENT_IN_LOOP] = "current_in_loop",
53 [AD74413R_RESISTANCE] = "resistance",
54 [AD74413R_DIGITAL_INPUT] = "digital_input",
55 [AD74413R_DIGITAL_INPUT_LOOP] = "digital_input_loop",
56 [AD74413R_CURRENT_IN_EXT_HART] = "current_in_ext_hart",
57 [AD74413R_CURRENT_IN_LOOP_HART] = "current_in_loop_hart"
58};
59
65
70
76
95
103
104int swiot_iio_init(struct swiot_iio_desc **,
106int swiot_iio_remove(struct swiot_iio_desc *);
107
108#endif
Header file of AD74413r Driver.
#define AD74413R_N_DIAG_CHANNELS
Definition ad74413r.h:42
#define AD74413R_N_CHANNELS
Definition ad74413r.h:41
@ AD74413R_VOLTAGE_OUT
Definition ad74413r.h:195
@ AD74413R_RESISTANCE
Definition ad74413r.h:200
@ AD74413R_CURRENT_IN_EXT
Definition ad74413r.h:198
@ AD74413R_CURRENT_OUT
Definition ad74413r.h:196
@ AD74413R_CURRENT_IN_EXT_HART
Definition ad74413r.h:203
@ AD74413R_CURRENT_IN_LOOP_HART
Definition ad74413r.h:204
@ AD74413R_CURRENT_IN_LOOP
Definition ad74413r.h:199
@ AD74413R_DIGITAL_INPUT_LOOP
Definition ad74413r.h:202
@ AD74413R_DIGITAL_INPUT
Definition ad74413r.h:201
@ AD74413R_VOLTAGE_IN
Definition ad74413r.h:197
@ AD74413R_HIGH_Z
Definition ad74413r.h:194
Header file of the IIO AD74413r Driver.
Header file of MAX14906 IIO Driver.
Header file of MAX14906 Driver.
#define MAX14906_CHANNELS
Definition max14906.h:43
Header file of GPIO Interface.
Device channel state.
Definition ad74413r.h:313
Diagnostics channel state.
Definition iio_ad74413r.h:43
Descriptor that stores a iio specific state.
Definition iio_ad74413r.h:68
ADIN1110 device descriptor.
Definition adin1110.h:204
Structure holding channels and attributes of a device.
Definition iio_types.h:238
Configuration structure for a MAX14906 channel.
Definition iio_max14906.h:46
Structure holding the GPIO descriptor.
Definition no_os_gpio.h:84
Structure holding the parameters for GPIO initialization.
Definition no_os_gpio.h:67
Definition swiot.h:71
bool enabled
Definition swiot.h:72
uint32_t function
Definition swiot.h:74
enum swiot_device device
Definition swiot.h:73
Definition swiot.h:96
struct max149x6_iio_desc * max14906
Definition swiot.h:98
struct ad74413r_iio_desc * ad74413r
Definition swiot.h:97
struct no_os_gpio_init_param psu_gpio_param
Definition swiot.h:99
struct no_os_gpio_init_param identify_gpio_param
Definition swiot.h:100
enum swiot_mode mode
Definition swiot.h:101
Definition swiot.h:77
struct no_os_gpio_desc * identify_gpio
Definition swiot.h:88
struct ad74413r_channel_config ad74413r_configs[AD74413R_N_CHANNELS]
Definition swiot.h:91
struct iio_device * iio_dev
Definition swiot.h:81
bool mode_change
Definition swiot.h:86
struct no_os_gpio_desc * psu_gpio
Definition swiot.h:87
uint8_t no_of_active_channels
Definition swiot.h:83
struct ad74413r_iio_desc * ad74413r
Definition swiot.h:78
uint32_t active_channels
Definition swiot.h:82
struct adin1110_desc * adin1110
Definition swiot.h:80
struct ad74413r_diag_channel_config ad74413r_diag_configs[AD74413R_N_DIAG_CHANNELS]
Definition swiot.h:92
enum swiot_mode mode
Definition swiot.h:85
struct max149x6_iio_desc * max14906
Definition swiot.h:79
struct max14906_ch_config max14906_configs[MAX14906_CHANNELS]
Definition swiot.h:90
int swiot_iio_remove(struct swiot_iio_desc *)
Free the swiot iio descriptor.
Definition swiot.c:697
swiot_device
Definition swiot.h:60
@ SWIOT_MAX14906
Definition swiot.h:62
@ SWIOT_DEV_CNT
Definition swiot.h:63
@ SWIOT_AD74413R
Definition swiot.h:61
swiot_mode
Definition swiot.h:66
@ SWIOT_CONFIG
Definition swiot.h:67
@ SWIOT_RUNTIME
Definition swiot.h:68
int swiot_iio_init(struct swiot_iio_desc **, struct swiot_iio_desc_init_param *)
Initializes the swiot IIO descriptor.
Definition swiot.c:642