Go to the documentation of this file.
33 #ifndef IIO_MAX22017_H
34 #define IIO_MAX22017_H
@ MAX22017_IIO_CM_SENSE
Definition: iio_max22017.h:50
@ MAX22017_IIO_RANGE
Definition: iio_max22017.h:43
@ MAX22017_250_OHM_RESISTOR
Definition: max22017.h:127
@ MAX22017_UPDATE_RATE_64KHZ_32KHZ
Definition: max22017.h:162
#define END_ATTRIBUTES_ARRAY
Definition: iio_types.h:116
@ MAX22017_IIO_OVC_SHTDN
Definition: iio_max22017.h:58
int max22017_iio_remove(struct max22017_iio_desc *)
Definition: iio_max22017.c:775
@ IIO_VAL_INT
Definition: iio_types.h:50
Struct describing the scan type.
Definition: iio_types.h:168
@ MAX22017_TIMEOUT_800MS
Definition: max22017.h:138
@ MAX22017_TIMEOUT_1300MS
Definition: max22017.h:143
@ MAX22017_TIMEOUT_900MS
Definition: max22017.h:139
#define MAX22017_SR_SEL_MASK
Definition: max22017.h:81
int max22017_iio_init(struct max22017_iio_desc **iio_desc, struct max22017_iio_desc_init_param *init_param)
Definition: iio_max22017.c:745
struct iio_device * iio_dev
Definition: iio_max22017.h:86
@ MAX22017_INPUT_VOLTAGE_MODE
Definition: max22017.h:112
#define MAX22017_EXT_DAC_REF_MASK
Definition: max22017.h:75
@ MAX22017_IIO_TH_SHTDN
Definition: iio_max22017.h:59
struct iio_channel * channels
Definition: iio_types.h:254
#define MAX22017_SR_STEP_SIZE_MASK
Definition: max22017.h:82
#define MAX22017_GEN_INTEN
Definition: max22017.h:52
#define MAX22017_AO_SLEW_RATE_CH2
Definition: max22017.h:60
@ MAX22017_UPDATE_RATE_12KHZ_6KHZ
Definition: max22017.h:165
@ MAX22017_STEP_SIZE_26BITS
Definition: max22017.h:154
#define MAX22017_AO_CNFG
Definition: max22017.h:58
@ MAX22017_CH1
Definition: max22017.h:172
@ MAX22017_OUTPUT_VOLTAGE_NO_MONITORRING
Definition: max22017.h:114
Structure holding channel attributess.
Definition: iio_types.h:103
#define MAX22017_AO_SLEW_RATE_CH1
Definition: max22017.h:59
@ MAX22017_IIO_LDAC
Definition: iio_max22017.h:51
Header file of IIO MAX22017 Driver.
Header file of MAX22017 Driver.
@ MAX22017_TIMEOUT_1600MS
Definition: max22017.h:146
@ MAX22017_TIMEOUT_1000MS
Definition: max22017.h:140
@ MAX22017_UPDATE_RATE_15KHZ_7KHZ
Definition: max22017.h:166
@ MAX22017_IIO_ENABLE_AVAILABLE
Definition: iio_max22017.h:70
@ MAX22017_STEP_SIZE_1024BITS
Definition: max22017.h:151
#define MAX22017_IIO_CNFG_MASK(x, y)
Definition: iio_max22017.c:55
@ MAX22017_IIO_STEP_SIZE_AVAILABLE
Definition: iio_max22017.h:72
#define MAX22017_UNI_MASK(x)
Definition: max22017.h:93
int max22017_set_data(struct max22017_desc *desc, enum max22017_channel ch, int32_t data)
Set data of the selected channel.
Definition: max22017.c:274
@ MAX22017_STEP_SIZE_16384BITS
Definition: max22017.h:153
max22017_iio_slew_rate
Definition: iio_max22017.h:41
max22017_cm_sense
Definition: max22017.h:125
#define MAX22017_GEN_INT
Definition: max22017.h:51
void * no_os_calloc(size_t nitems, size_t size)
Allocate memory and return a pointer to it, set memory to 0.
Definition: chibios_alloc.c:54
#define NO_OS_ARRAY_SIZE(x)
Definition: no_os_util.h:49
@ MAX22017_TIMEOUT_700MS
Definition: max22017.h:137
@ MAX22017_UNIPOLAR
Definition: max22017.h:122
@ MAX22017_TIMEOUT_600MS
Definition: max22017.h:136
int max22017_config(struct max22017_desc *desc, enum max22017_channel ch, enum max22017_out_mode uni, enum max22017_cm_sense cm_sense, bool ldac)
Set AO configuration.
Definition: max22017.c:404
#define MAX22017_AO_OFFSET_CORR_CH1
Definition: max22017.h:63
@ MAX22017_OUTPUT_VOLTAGE_MONITORRING
Definition: max22017.h:116
int max22017_iio_read_avail(const char *const *array_avail, char *buf, uint32_t len)
Definition: iio_max22017.c:400
uint32_t no_os_field_prep(uint32_t mask, uint32_t val)
#define MAX22017_TIMEOUT_CNFG_MASK
Definition: max22017.h:99
@ MAX22017_TIMEOUT_100MS
Definition: max22017.h:131
int max22017_init(struct max22017_desc **desc, struct max22017_init_param *param)
Initialize and configure the MAX22017 device.
Definition: max22017.c:566
const char * name
Definition: iio_types.h:131
@ MAX22017_IIO_TIMEOUT
Definition: iio_max22017.h:64
int max22017_iio_init(struct max22017_iio_desc **, struct max22017_iio_desc_init_param *)
Definition: iio_max22017.c:745
@ MAX22017_TIMEOUT_1400MS
Definition: max22017.h:144
@ MAX22017_IIO_SLEW_RATE
Definition: iio_max22017.h:42
@ MAX22017_50_OHM_RESISTOR
Definition: max22017.h:126
#define MAX22017_LD_CNFG_MASK(x)
Definition: max22017.h:91
struct max22017_init_param * max22017_init_param
Definition: iio_max22017.h:93
@ MAX22017_UPDATE_RATE_160KHZ_80KHZ
Definition: max22017.h:163
max22017_iio_ao_config
Definition: iio_max22017.h:48
@ MAX22017_IIO_OP_MODE_AVAILABLE
Definition: iio_max22017.h:74
#define MAX22017_CM_SENSE_MASK(x)
Definition: max22017.h:92
Structure holding the MAX22017 initialization parameter.
Definition: max22017.h:187
Structure holding pointers to show and store functions.
Definition: iio_types.h:129
max22017_out_mode
Definition: max22017.h:120
@ MAX22017_IIO_CURR_LIM
Definition: iio_max22017.h:57
int max22017_remove(struct max22017_desc *desc)
Free the resources allocated during init and perform a soft reset.
Definition: max22017.c:652
@ MAX22017_HIGH_Z
Definition: max22017.h:111
@ MAX22017_IIO_POLARITY
Definition: iio_max22017.h:49
@ MAX22017_STEP_SIZE_512BITS
Definition: max22017.h:150
max22017_op_mode
Definition: max22017.h:110
max22017_iio_config
Definition: iio_max22017.h:54
struct max22017_desc * max22017_desc
Definition: iio_max22017.h:85
@ MAX22017_UPDATE_RATE_32KHZ_16KHZ
Definition: max22017.h:168
int max22017_get_data(struct max22017_desc *desc, enum max22017_channel ch, int32_t *data)
Get data from requestec channel.
Definition: max22017.c:294
#define MAX22017_TIMEOUT_MASK
Definition: max22017.h:101
@ MAX22017_TIMEOUT_200MS
Definition: max22017.h:132
@ MAX22017_TIMEOUT_1200MS
Definition: max22017.h:142
#define MAX22017_SR_UPDATE_RATE_MASK
Definition: max22017.h:83
#define MAX22017_GEN_CNFG
Definition: max22017.h:46
@ MAX22017_TIMEOUT_300MS
Definition: max22017.h:133
int32_t iio_parse_value(char *buf, enum iio_val fmt, int32_t *val, int32_t *val2)
Definition: iio.c:630
@ MAX22017_IIO_CONFIG_ENABLE_AVAILABLE
Definition: iio_max22017.h:77
@ MAX22017_IIO_OW_DETECT
Definition: iio_max22017.h:60
#define MAX22017_AO_CMD
Definition: max22017.h:56
@ MAX22017_OUTPUT_CURRENT_NO_MONITORRING
Definition: max22017.h:115
#define MAX22017_TIMEOUT_EN_MASK
Definition: max22017.h:100
@ MAX22017_IIO_RANGE_AVAILABLE
Definition: iio_max22017.h:71
max22017_sr_step_size
Definition: max22017.h:149
@ MAX22017_TIMEOUT_1100MS
Definition: max22017.h:141
@ MAX22017_IIO_POLARITY_AVAILABLE
Definition: iio_max22017.h:75
int iio_format_value(char *buf, uint32_t len, enum iio_val fmt, int32_t size, int32_t *vals)
Definition: iio.c:686
uint32_t address
Definition: iio_types.h:113
@ MAX22017_UPDATE_RATE_4KHZ_2KHZ
Definition: max22017.h:161
uint32_t no_os_field_get(uint32_t mask, uint32_t word)
max22017_iio_timeout
Definition: iio_max22017.h:63
int max22017_gain_calib(struct max22017_desc *desc, enum max22017_channel ch, uint16_t gain)
Set gain value for calibration of requested channel.
Definition: max22017.c:362
@ MAX22017_IIO_UPDATE_RATE_AVAILABLE
Definition: iio_max22017.h:73
@ MAX22017_STEP_SIZE_4096BITS
Definition: max22017.h:152
Header file for iio_types.
@ MAX22017_IIO_TIMEOUT_AVAILABLE
Definition: iio_max22017.h:78
void no_os_free(void *ptr)
Deallocate memory previously allocated by a call to no_os_calloc or no_os_malloc.
Definition: chibios_alloc.c:69
Structure holding the MAX22017 IIO descriptor.
Definition: iio_max22017.h:84
int max22017_reg_read(struct max22017_desc *desc, uint32_t addr, uint32_t *val)
Read the value of a device register.
Definition: max22017.c:468
@ MAX22017_IIO_STEP_SIZE
Definition: iio_max22017.h:44
#define NULL
Definition: wrapper.h:64
@ MAX22017_UPDATE_RATE_20KHZ_10KHZ
Definition: max22017.h:167
struct ad7616_init_param init_param
Definition: ad7616_sdz.c:113
Structure holding channels and attributes of a device.
Definition: iio_types.h:247
@ MAX22017_TIMEOUT_1500MS
Definition: max22017.h:145
@ MAX22017_IIO_LD_CTRL
Definition: iio_max22017.h:56
int max22017_iio_remove(struct max22017_iio_desc *iio_desc)
Definition: iio_max22017.c:775
@ MAX22017_STEP_SIZE_31BITS
Definition: max22017.h:156
int max22017_offset_calib(struct max22017_desc *desc, enum max22017_channel ch, int16_t offset)
Set offset value for output calibration.
Definition: max22017.c:344
@ MAX22017_STEP_SIZE_28BITS
Definition: max22017.h:155
@ MAX22017_IIO_TIMEOUT_CFG
Definition: iio_max22017.h:66
#define MAX22017_CHANNEL(_addr)
Definition: iio_max22017.c:45
@ MAX22017_TIMEOUT_500MS
Definition: max22017.h:135
@ MAX22017_UPDATE_RATE_200KHZ_100KHZ
Definition: max22017.h:164
@ MAX22017_TIMEOUT_400MS
Definition: max22017.h:134
@ MAX22017_BIPOLAR
Definition: max22017.h:121
int max22017_reg_update(struct max22017_desc *desc, uint32_t addr, uint32_t mask, uint32_t val)
Update the value of a device register (read/write sequence).
Definition: max22017.c:544
@ MAX22017_IIO_UPDATE_RATE
Definition: iio_max22017.h:45
int max22017_reg_write(struct max22017_desc *desc, uint32_t addr, uint32_t val)
Write the value of a device register.
Definition: max22017.c:513
@ MAX22017_INPUT_CURRENT_MODE
Definition: max22017.h:113
@ MAX22017_IIO_CM_SENSE_AVAILABLE
Definition: iio_max22017.h:76
#define MAX22017_AO_OFFSET_CORR_CH2
Definition: max22017.h:65
max22017_channel
Definition: max22017.h:171
Header file of utility functions.
@ MAX22017_OUTPUT_CURRENT_MONITORRING
Definition: max22017.h:117
@ MAX22017_IIO_DAC_REF
Definition: iio_max22017.h:55
Structure holding the MAX22017 device descriptor.
Definition: max22017.h:200
int max22017_slew_rate(struct max22017_desc *desc, enum max22017_channel ch, enum max22017_sr_step_size step_size, enum max22017_sr_update_rate update_rate, bool enable, bool hart)
Set slew rate settings for requested channels.
Definition: max22017.c:321
max22017_iio_available
Definition: iio_max22017.h:69
@ MAX22017_STEP_SIZE_35BITS
Definition: max22017.h:157
@ MAX22017_IIO_TIMEOUT_EN
Definition: iio_max22017.h:65
@ MAX22017_CH2
Definition: max22017.h:173
max22017_sr_update_rate
Definition: max22017.h:160
#define MAX22017_SR_EN_MASK
Definition: max22017.h:80
Structure holding the MAX22017 IIO initialization parameter.
Definition: iio_max22017.h:92