Go to the documentation of this file.
33 #ifndef IIO_MAX22196_H
34 #define IIO_MAX22196_H
41 #define MAX22196_GLOBAL_CLRFILTR 3
@ MAX22196_1X_CURRENT
Definition: max22196.h:127
@ MAX22196_FAULT2_OTSHDN2
Definition: max22196.h:97
#define END_ATTRIBUTES_ARRAY
Definition: iio_types.h:116
@ IIO_VAL_INT
Definition: iio_types.h:50
Struct describing the scan type.
Definition: iio_types.h:168
Header file of IIO MAX22196 Driver.
@ MAX22196_GLOBAL_LEDINT
Definition: max22196.h:105
int max22196_iio_remove(struct max22196_iio_desc *iio_desc)
Free resources allocated by the init function.
Definition: iio_max22196.c:863
max22196_iio_fault
Definition: iio_max22196.h:43
#define MAX22196_CHANNEL(_addr)
Definition: iio_max22196.c:288
struct iio_channel * channels
Definition: iio_types.h:254
Header file of MAX22196 Driver.
Structure holding channel attributess.
Definition: iio_types.h:103
Definition: max22196.h:140
int max22196_reg_write(struct max22196_desc *desc, uint32_t reg, uint32_t val)
MAX22196 register write function.
Definition: max22196.c:93
#define MAX22196_FAULT1_REG
Definition: max22196.h:50
int max22196_reg_read(struct max22196_desc *desc, uint32_t reg, uint32_t *val)
MAX22196 register read function.
Definition: max22196.c:121
#define MAX22196_DI_STATE_MASK(x)
Definition: max22196.h:65
@ MAX22196_FAULT2_RFDIS
Definition: max22196.h:95
int max22196_iio_init(struct max22196_iio_desc **, struct max22196_iio_desc_init_param *)
Initializes the MAX22196 IIO descriptor.
Definition: iio_max22196.c:825
@ MAX22196_FAULT1_V24UV
Definition: max22196.h:91
@ MAX22196_FAULT1_VMLOW
Definition: max22196.h:90
int max22196_fault_mask_get(struct max22196_desc *desc, enum max22196_fault_mask fault_mask, bool *enabled)
Get fault mask bits from the fault mask registers.
Definition: max22196.c:346
#define MAX22196_SOURCE_MASK
Definition: max22196.h:67
@ MAX22196_GLOBAL_GPO
Definition: max22196.h:106
@ MAX22196_GLOBAL_FSPICLR
Definition: max22196.h:103
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
@ MAX22196_FAULT2_SPI8CLK
Definition: max22196.h:98
#define MAX22196_FLTEN_MASK
Definition: max22196.h:69
@ MAX22196_IIO_FAULT1
Definition: iio_max22196.h:44
#define MAX22196_DELAY_MASK
Definition: max22196.h:70
MAX22196 IIO descriptor.
Definition: iio_max22196.h:51
int32_t(* debug_reg_read)(void *dev, uint32_t reg, uint32_t *readval)
Definition: iio_types.h:283
@ MAX22196_FAULT2_RFDIO
Definition: max22196.h:96
uint8_t max_chn_nb
Definition: max22196.h:148
@ IIO_SHARED_BY_ALL
Definition: iio_types.h:122
uint32_t no_os_field_prep(uint32_t mask, uint32_t val)
struct max22196_desc * max22196_desc
Definition: iio_max22196.h:52
struct iio_device * iio_dev
Definition: iio_max22196.h:53
@ MAX22196_SINK_MODE
Definition: max22196.h:110
#define MAX22196_CURR_MASK
Definition: max22196.h:68
const char * name
Definition: iio_types.h:131
#define MAX22196_CFG_REG(x)
Definition: max22196.h:52
int max22196_init(struct max22196_desc **desc, struct max22196_init_param *param)
Initialize and configure the MAX22196 device.
Definition: max22196.c:501
@ MAX22196_HTL_MODE
Definition: max22196.h:126
@ MAX22196_GLOBAL_LED9
Definition: max22196.h:104
int max22196_iio_init(struct max22196_iio_desc **iio_desc, struct max22196_iio_desc_init_param *init_param)
Initializes the MAX22196 IIO descriptor.
Definition: iio_max22196.c:825
Structure holding pointers to show and store functions.
Definition: iio_types.h:129
@ MAX22196_FAULT1_FAULT2
Definition: max22196.h:94
MAX22196 IIO initalization parameter.
Definition: iio_max22196.h:59
int32_t iio_parse_value(char *buf, enum iio_val fmt, int32_t *val, int32_t *val2)
Definition: iio.c:630
#define MAX22196_GLOBAL_CLRFILTR
Definition: iio_max22196.h:41
Definition: max22196.h:132
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
uint32_t no_os_field_get(uint32_t mask, uint32_t word)
uint16_t num_ch
Definition: iio_types.h:252
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
#define MAX22196_FAULT2_REG
Definition: max22196.h:55
#define NULL
Definition: wrapper.h:64
int max22196_fault_mask_set(struct max22196_desc *desc, enum max22196_fault_mask fault_mask, bool enabled)
Set fault mask bits in the fault mask registers.
Definition: max22196.c:295
struct ad7616_init_param init_param
Definition: ad7616_sdz.c:113
Structure holding channels and attributes of a device.
Definition: iio_types.h:247
int max22196_iio_remove(struct max22196_iio_desc *)
Free resources allocated by the init function.
Definition: iio_max22196.c:863
@ MAX22196_TTL_OP_OFF
Definition: max22196.h:129
int max22196_remove(struct max22196_desc *desc)
Free the resources allocated during init.
Definition: max22196.c:557
int max22196_iio_setup_channels(struct max22196_iio_desc *desc)
Configure a set if IIO channels based on the chip id physical channels.
Definition: iio_max22196.c:773
@ MAX22196_FAULT2_VAUV
Definition: max22196.h:99
@ MAX22196_SOURCE_MODE
Definition: max22196.h:111
@ MAX22196_FAULT1_OTSHDN1
Definition: max22196.h:93
@ MAX22196_FAULT1_TEMPALM
Definition: max22196.h:92
struct max22196_init_param * max22196_init_param
Definition: iio_max22196.h:60
int max22196_reg_update(struct max22196_desc *desc, uint32_t reg, uint32_t mask, uint32_t val)
MAX22196 register update function
Definition: max22196.c:166
Header file of utility functions.
max22196_global_cfg
Definition: max22196.h:102
@ MAX22196_IIO_FAULT2
Definition: iio_max22196.h:45
@ MAX22196_GLOBAL_REFDISHTCFG
Definition: max22196.h:89
#define MAX22196_DI_STATE_REG
Definition: max22196.h:49
@ MAX22196_3X_CURRENT
Definition: max22196.h:128