Go to the documentation of this file.
33 #ifndef __IIO_LT8722_H__
34 #define __IIO_LT8722_H__
int lt8722_iio_remove(struct lt8722_iio_dev *desc)
Free resources allocated by the init function.
Definition: iio_lt8722.c:1876
Device descriptor for LT8722.
Definition: lt8722.h:373
#define LT8722_ENABLE_REQ_MASK
Definition: lt8722.h:107
#define LT8722_SPIS_STATUS_MASK
Definition: lt8722.h:88
@ LT8722_PWR_LIM
Definition: iio_lt8722.c:215
@ LT8722_SWEN_PIN
Definition: iio_lt8722.c:240
#define END_ATTRIBUTES_ARRAY
Definition: iio_types.h:116
#define LT8722_AMUX_TEST_MASK
Definition: lt8722.h:162
@ LT8722_SW_VC_INT
Definition: iio_lt8722.c:213
#define LT8722_SPIS_COMMAND_MASK
Definition: lt8722.h:87
@ LT8722_OVER_CURRENT
Definition: iio_lt8722.c:224
#define LT8722_AOUT_EN_MASK
Definition: lt8722.h:163
@ IIO_VAL_INT
Definition: iio_types.h:50
Struct describing the scan type.
Definition: iio_types.h:168
@ LT8722_ENABLE_REQ
Definition: iio_lt8722.c:207
@ LT8722_MIN_OT
Definition: iio_lt8722.c:222
struct iio_channel * channels
Definition: iio_types.h:254
@ LT8722_SWEN
Definition: iio_lt8722.c:219
@ LT8722_SWEN_REQ
Definition: iio_lt8722.c:208
int lt8722_get_spis_dac_ilimp(struct lt8722_dev *dev, uint16_t *value)
Get positive output current limit of LT8722 device.
Definition: lt8722.c:663
#define LT8722_SYS_DC_MASK
Definition: lt8722.h:111
int lt8722_iio_init(struct lt8722_iio_dev **, struct lt8722_iio_dev_init_param *)
Initializes the LT8722 IIO descriptor.
Definition: iio_lt8722.c:1841
int lt8722_iio_init(struct lt8722_iio_dev **iio_dev, struct lt8722_iio_dev_init_param *init_param)
Initializes the LT8722 IIO descriptor.
Definition: iio_lt8722.c:1841
Structure holding channel attributess.
Definition: iio_types.h:103
int lt8722_reg_read(struct lt8722_dev *dev, uint8_t address, uint32_t *data)
Read data from LT8722 device.
Definition: lt8722.c:160
@ LT8722_SPI_RST
Definition: iio_lt8722.c:214
int lt8722_set_spis_dac_ilimn(struct lt8722_dev *dev, uint16_t value)
Set negative output current limit of LT8722 device.
Definition: lt8722.c:598
int lt8722_reg_write_mask(struct lt8722_dev *dev, uint8_t address, uint32_t mask, uint32_t data)
Write to LT8722 device register with mask.
Definition: lt8722.c:217
int lt8722_iio_remove(struct lt8722_iio_dev *)
Free resources allocated by the init function.
Definition: iio_lt8722.c:1876
int lt8722_get_spis_dac_ilimn(struct lt8722_dev *dev, uint16_t *value)
Get negative output current limit of LT8722 device.
Definition: lt8722.c:619
Structure holding the LT8722 IIO initalization parameter.
Definition: iio_lt8722.h:53
lt8722_iio_spis_amux_attrs
Definition: iio_lt8722.c:232
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
#define LT8722_SRVO_ILIM_MASK
Definition: lt8722.h:123
Structure holding the available values for an attribute.
Definition: iio_lt8722.c:48
@ LT8722_SRVO_PLIM
Definition: iio_lt8722.c:221
struct lt8722_iio_attr_avail lt8722_iio_get_command_available(enum lt8722_iio_spis_command_attrs attr)
Get the list of available values of a SPIS_COMMAND register attribute.
Definition: iio_lt8722.c:736
int lt8722_set_spis_ov_clamp(struct lt8722_dev *dev, uint8_t value)
Set positive output voltage limit of LT8722 device.
Definition: lt8722.c:724
int lt8722_set_dac(struct lt8722_dev *dev, uint32_t value)
Set DAC code of LT8722 device.
Definition: lt8722.c:686
@ LT8722_VDDIO_UVLO
Definition: iio_lt8722.c:227
uint32_t lt8722_iio_get_mask_command(enum lt8722_iio_spis_command_attrs attr)
Get the mask for the SPIS command register.
Definition: iio_lt8722.c:650
int64_t no_os_div_s64(int64_t dividend, int32_t divisor)
#define LT8722_VCC_UVLO_MASK
Definition: lt8722.h:129
Initialization parameter for the LT8722 device.
Definition: lt8722.h:362
#define LT8722_SPIS_AMUX_MASK
Definition: lt8722.h:94
int lt8722_get_spis_uv_clamp(struct lt8722_dev *dev, uint8_t *value)
Get negative output voltage limit of LT8722 device.
Definition: lt8722.c:777
#define LT8722_SWEN_MASK
Definition: lt8722.h:122
const char *const * alt_values
Definition: iio_lt8722.c:51
#define LT8722_VCC_VREG_MASK
Definition: lt8722.h:112
@ LT8722_VCC_UVLO
Definition: iio_lt8722.c:226
const char * name
Definition: iio_types.h:131
#define LT8722_TSD_MASK
Definition: lt8722.h:128
const char * name
Definition: iio_types.h:170
@ LT8722_SRVO_ILIM
Definition: iio_lt8722.c:220
Header file for the LT8722 Driver.
int lt8722_set_spis_dac_ilimp(struct lt8722_dev *dev, uint16_t value)
Set positive output current limit of LT8722 device.
Definition: lt8722.c:642
Header file for the LT8722 IIO Driver.
#define LT8722_SPIS_STATUS
Definition: lt8722.h:68
lt8722_iio_spis_command_attrs
Definition: iio_lt8722.c:206
@ LT8722_AMUX_TEST
Definition: iio_lt8722.c:234
struct lt8722_init_param * lt8722_init_param
Definition: iio_lt8722.h:54
int lt8722_set_swen_pin(struct lt8722_dev *dev, uint8_t value)
Set SWEN pin of LT8722 device.
Definition: lt8722.c:970
#define LT8722_PWR_LIM_MASK
Definition: lt8722.h:116
struct lt8722_iio_attr_avail lt8722_iio_get_amux_available(enum lt8722_iio_spis_amux_attrs attr)
Get the list of available values of a SPIS_AMUX register attribute.
Definition: iio_lt8722.c:848
Structure holding pointers to show and store functions.
Definition: iio_types.h:129
const char *const * values
Definition: iio_lt8722.c:50
int lt8722_remove(struct lt8722_dev *dev)
Free the resources allocated by the lt8722_init()
Definition: lt8722.c:1148
#define LT8722_OVER_CURRENT_MASK
Definition: lt8722.h:127
struct iio_device * iio_dev
Definition: iio_lt8722.h:46
struct lt8722_dev * lt8722_dev
Definition: iio_lt8722.h:45
@ LT8722_SW_FRQ_SET
Definition: iio_lt8722.c:209
#define LT8722_SW_VC_INT_MASK
Definition: lt8722.h:113
lt8722_iio_pins
Definition: iio_lt8722.c:238
int32_t iio_parse_value(char *buf, enum iio_val fmt, int32_t *val, int32_t *val2)
Definition: iio.c:630
#define LT8722_MIN_OT_MASK
Definition: lt8722.h:125
#define LT8722_V2P5_UVLO_MASK
Definition: lt8722.h:132
@ LT8722_AOUT_EN
Definition: iio_lt8722.c:235
#define LT8722_SPIS_COMMAND
Definition: lt8722.h:67
@ IIO_VOLTAGE
Definition: iio_types.h:65
int lt8722_set_spis_uv_clamp(struct lt8722_dev *dev, uint8_t value)
Set negative output voltage limit of LT8722 device.
Definition: lt8722.c:762
int lt8722_get_output_voltage(struct lt8722_dev *dev, int64_t *value)
Get output volatge of LT8722 device.
Definition: lt8722.c:912
int lt8722_set_en_pin(struct lt8722_dev *dev, uint8_t value)
Set EN pin of LT8722 device.
Definition: lt8722.c:998
@ LT8722_VCC_VREG
Definition: iio_lt8722.c:212
@ LT8722_POR_OCC
Definition: iio_lt8722.c:223
#define LT8722_SPI_RST_MASK
Definition: lt8722.h:114
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 no_os_field_get(uint32_t mask, uint32_t word)
int lt8722_get_dac(struct lt8722_dev *dev, uint32_t *value)
Get DAC code of LT8722 device.
Definition: lt8722.c:701
struct iio_attribute * attributes
Definition: iio_types.h:186
@ LT8722_CP_UVLO
Definition: iio_lt8722.c:228
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 LT8722_SRVO_PLIM_MASK
Definition: lt8722.h:124
@ LT8722_SW_FRQ_ADJ
Definition: iio_lt8722.c:210
int num_values
Definition: iio_lt8722.c:49
int lt8722_reg_write(struct lt8722_dev *dev, uint8_t address, uint32_t data)
Write data to LT8722 device.
Definition: lt8722.c:191
@ LT8722_SYS_DC
Definition: iio_lt8722.c:211
#define NULL
Definition: wrapper.h:64
int lt8722_get_spis_ov_clamp(struct lt8722_dev *dev, uint8_t *value)
Get positive output voltage limit of LT8722 device.
Definition: lt8722.c:739
struct ad7616_init_param init_param
Definition: ad7616_sdz.c:113
Structure holding channels and attributes of a device.
Definition: iio_types.h:247
lt8722_iio_spis_status_attrs
Definition: iio_lt8722.c:218
#define LT8722_AMUX_MASK
Definition: lt8722.h:161
@ LT8722_EN_PIN
Definition: iio_lt8722.c:239
@ LT8722_V2P5_UVLO
Definition: iio_lt8722.c:229
#define LT8722_SWEN_REQ_MASK
Definition: lt8722.h:108
int lt8722_set_output_voltage(struct lt8722_dev *dev, int64_t value)
Set output volatge of LT8722 device.
Definition: lt8722.c:892
int lt8722_get_swen_pin(struct lt8722_dev *dev, uint8_t *value)
Get SWEN pin of LT8722 device.
Definition: lt8722.c:984
struct lt8722_iio_attr_avail lt8722_iio_get_status_attr_available(enum lt8722_iio_spis_status_attrs attr)
Get the list of available values of a SPIS_STATUS register attribute.
Definition: iio_lt8722.c:788
#define LT8722_SW_FRQ_SET_MASK
Definition: lt8722.h:109
Structure holding the LT8722 IIO device descriptor.
Definition: iio_lt8722.h:44
Header file of utility functions.
#define LT8722_CP_UVLO_MASK
Definition: lt8722.h:131
#define LT8722_VDDIO_UVLO_MASK
Definition: lt8722.h:130
int lt8722_get_en_pin(struct lt8722_dev *dev, uint8_t *value)
Get EN pin of LT8722 device.
Definition: lt8722.c:1012
@ LT8722_TSD
Definition: iio_lt8722.c:225
#define LT8722_SW_FRQ_ADJ_MASK
Definition: lt8722.h:110
uint32_t lt8722_iio_get_mask_status(enum lt8722_iio_spis_status_attrs attr)
Get the mask for the SPIS status register.
Definition: iio_lt8722.c:681
@ LT8722_AMUX
Definition: iio_lt8722.c:233
uint32_t lt8722_iio_get_mask_amux(enum lt8722_iio_spis_amux_attrs attr)
Get the mask for the SPIS AMUX register.
Definition: iio_lt8722.c:716
#define LT8722_SPIS_AMUX
Definition: lt8722.h:74
Error macro definition for ARM Compiler.
int lt8722_get_amux(struct lt8722_dev *dev, enum lt8722_amux *value, uint8_t *test)
Get analot output signal source of LT8722 device.
Definition: lt8722.c:867
int lt8722_init(struct lt8722_dev **device, struct lt8722_init_param *init_param)
Initialize the LT8722 device.
Definition: lt8722.c:1027
#define LT8722_POR_OCC_MASK
Definition: lt8722.h:126