no-OS
iio_max22196.h
Go to the documentation of this file.
1 /***************************************************************************/
33 #ifndef IIO_MAX22196_H
34 #define IIO_MAX22196_H
35 
36 #include <stdint.h>
37 #include <stdbool.h>
38 #include "iio.h"
39 #include "max22196.h"
40 
41 #define MAX22196_GLOBAL_CLRFILTR 3
42 
46 };
47 
54 };
55 
61 };
62 
66 
69 
70 #endif /* IIO_MAX22196_H */
MAX22196_1X_CURRENT
@ MAX22196_1X_CURRENT
Definition: max22196.h:127
MAX22196_FAULT2_OTSHDN2
@ MAX22196_FAULT2_OTSHDN2
Definition: max22196.h:97
no_os_alloc.h
END_ATTRIBUTES_ARRAY
#define END_ATTRIBUTES_ARRAY
Definition: iio_types.h:116
IIO_VAL_INT
@ IIO_VAL_INT
Definition: iio_types.h:50
iio_channel
Struct describing the scan type.
Definition: iio_types.h:168
iio_max22196.h
Header file of IIO MAX22196 Driver.
MAX22196_GLOBAL_LEDINT
@ MAX22196_GLOBAL_LEDINT
Definition: max22196.h:105
max22196_iio_remove
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
max22196_iio_fault
Definition: iio_max22196.h:43
MAX22196_CHANNEL
#define MAX22196_CHANNEL(_addr)
Definition: iio_max22196.c:288
iio_device::channels
struct iio_channel * channels
Definition: iio_types.h:254
max22196.h
Header file of MAX22196 Driver.
iio_desc
Definition: iio.c:204
iio_ch_info
Structure holding channel attributess.
Definition: iio_types.h:103
max22196_desc
Definition: max22196.h:140
max22196_reg_write
int max22196_reg_write(struct max22196_desc *desc, uint32_t reg, uint32_t val)
MAX22196 register write function.
Definition: max22196.c:93
no_os_units.h
Header file of Units.
MAX22196_FAULT1_REG
#define MAX22196_FAULT1_REG
Definition: max22196.h:50
max22196_reg_read
int max22196_reg_read(struct max22196_desc *desc, uint32_t reg, uint32_t *val)
MAX22196 register read function.
Definition: max22196.c:121
MAX22196_DI_STATE_MASK
#define MAX22196_DI_STATE_MASK(x)
Definition: max22196.h:65
MAX22196_FAULT2_RFDIS
@ MAX22196_FAULT2_RFDIS
Definition: max22196.h:95
max22196_iio_init
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
@ MAX22196_FAULT1_V24UV
Definition: max22196.h:91
MAX22196_FAULT1_VMLOW
@ MAX22196_FAULT1_VMLOW
Definition: max22196.h:90
max22196_fault_mask_get
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
MAX22196_SOURCE_MASK
#define MAX22196_SOURCE_MASK
Definition: max22196.h:67
MAX22196_GLOBAL_GPO
@ MAX22196_GLOBAL_GPO
Definition: max22196.h:106
MAX22196_GLOBAL_FSPICLR
@ MAX22196_GLOBAL_FSPICLR
Definition: max22196.h:103
no_os_calloc
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
NO_OS_ARRAY_SIZE
#define NO_OS_ARRAY_SIZE(x)
Definition: no_os_util.h:49
MAX22196_FAULT2_SPI8CLK
@ MAX22196_FAULT2_SPI8CLK
Definition: max22196.h:98
MAX22196_FLTEN_MASK
#define MAX22196_FLTEN_MASK
Definition: max22196.h:69
MAX22196_IIO_FAULT1
@ MAX22196_IIO_FAULT1
Definition: iio_max22196.h:44
MAX22196_DELAY_MASK
#define MAX22196_DELAY_MASK
Definition: max22196.h:70
max22196_iio_desc
MAX22196 IIO descriptor.
Definition: iio_max22196.h:51
iio_device::debug_reg_read
int32_t(* debug_reg_read)(void *dev, uint32_t reg, uint32_t *readval)
Definition: iio_types.h:283
MAX22196_FAULT2_RFDIO
@ MAX22196_FAULT2_RFDIO
Definition: max22196.h:96
max22196_desc::max_chn_nb
uint8_t max_chn_nb
Definition: max22196.h:148
IIO_SHARED_BY_ALL
@ IIO_SHARED_BY_ALL
Definition: iio_types.h:122
no_os_field_prep
uint32_t no_os_field_prep(uint32_t mask, uint32_t val)
max22196_iio_desc::max22196_desc
struct max22196_desc * max22196_desc
Definition: iio_max22196.h:52
max22196_iio_desc::iio_dev
struct iio_device * iio_dev
Definition: iio_max22196.h:53
MAX22196_SINK_MODE
@ MAX22196_SINK_MODE
Definition: max22196.h:110
iio.h
Header file of iio.
no_os_error.h
Error codes definition.
MAX22196_CURR_MASK
#define MAX22196_CURR_MASK
Definition: max22196.h:68
iio_attribute::name
const char * name
Definition: iio_types.h:131
MAX22196_CFG_REG
#define MAX22196_CFG_REG(x)
Definition: max22196.h:52
max22196_init
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
@ MAX22196_HTL_MODE
Definition: max22196.h:126
MAX22196_GLOBAL_LED9
@ MAX22196_GLOBAL_LED9
Definition: max22196.h:104
max22196_iio_init
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
iio_attribute
Structure holding pointers to show and store functions.
Definition: iio_types.h:129
MAX22196_FAULT1_FAULT2
@ MAX22196_FAULT1_FAULT2
Definition: max22196.h:94
max22196_iio_desc_init_param
MAX22196 IIO initalization parameter.
Definition: iio_max22196.h:59
iio_parse_value
int32_t iio_parse_value(char *buf, enum iio_val fmt, int32_t *val, int32_t *val2)
Definition: iio.c:630
MAX22196_GLOBAL_CLRFILTR
#define MAX22196_GLOBAL_CLRFILTR
Definition: iio_max22196.h:41
max22196_init_param
Definition: max22196.h:132
iio_format_value
int iio_format_value(char *buf, uint32_t len, enum iio_val fmt, int32_t size, int32_t *vals)
Definition: iio.c:686
iio_ch_info::address
uint32_t address
Definition: iio_types.h:113
no_os_field_get
uint32_t no_os_field_get(uint32_t mask, uint32_t word)
iio_device::num_ch
uint16_t num_ch
Definition: iio_types.h:252
no_os_free
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
MAX22196_FAULT2_REG
#define MAX22196_FAULT2_REG
Definition: max22196.h:55
NULL
#define NULL
Definition: wrapper.h:64
max22196_fault_mask_set
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
init_param
struct ad7616_init_param init_param
Definition: ad7616_sdz.c:113
iio_device
Structure holding channels and attributes of a device.
Definition: iio_types.h:247
max22196_iio_remove
int max22196_iio_remove(struct max22196_iio_desc *)
Free resources allocated by the init function.
Definition: iio_max22196.c:863
MAX22196_TTL_OP_OFF
@ MAX22196_TTL_OP_OFF
Definition: max22196.h:129
max22196_remove
int max22196_remove(struct max22196_desc *desc)
Free the resources allocated during init.
Definition: max22196.c:557
max22196_iio_setup_channels
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
@ MAX22196_FAULT2_VAUV
Definition: max22196.h:99
MAX22196_SOURCE_MODE
@ MAX22196_SOURCE_MODE
Definition: max22196.h:111
MAX22196_FAULT1_OTSHDN1
@ MAX22196_FAULT1_OTSHDN1
Definition: max22196.h:93
MAX22196_FAULT1_TEMPALM
@ MAX22196_FAULT1_TEMPALM
Definition: max22196.h:92
max22196_iio_desc_init_param::max22196_init_param
struct max22196_init_param * max22196_init_param
Definition: iio_max22196.h:60
max22196_reg_update
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
no_os_util.h
Header file of utility functions.
max22196_global_cfg
max22196_global_cfg
Definition: max22196.h:102
MAX22196_IIO_FAULT2
@ MAX22196_IIO_FAULT2
Definition: iio_max22196.h:45
MAX22196_GLOBAL_REFDISHTCFG
@ MAX22196_GLOBAL_REFDISHTCFG
Definition: max22196.h:89
MAX22196_DI_STATE_REG
#define MAX22196_DI_STATE_REG
Definition: max22196.h:49
MAX22196_3X_CURRENT
@ MAX22196_3X_CURRENT
Definition: max22196.h:128