no-OS
iio_lt8722.h
Go to the documentation of this file.
1 /***************************************************************************/
33 #ifndef __IIO_LT8722_H__
34 #define __IIO_LT8722_H__
35 
36 #include <stdbool.h>
37 #include "iio.h"
38 #include "lt8722.h"
39 
47 };
48 
55 };
56 
58 int lt8722_iio_init(struct lt8722_iio_dev **,
59  struct lt8722_iio_dev_init_param *);
60 
62 int lt8722_iio_remove(struct lt8722_iio_dev *);
63 
64 #endif /* __IIO_LT8722_H__ */
lt8722_iio_remove
int lt8722_iio_remove(struct lt8722_iio_dev *desc)
Free resources allocated by the init function.
Definition: iio_lt8722.c:1876
lt8722_dev
Device descriptor for LT8722.
Definition: lt8722.h:373
LT8722_ENABLE_REQ_MASK
#define LT8722_ENABLE_REQ_MASK
Definition: lt8722.h:107
LT8722_SPIS_STATUS_MASK
#define LT8722_SPIS_STATUS_MASK
Definition: lt8722.h:88
LT8722_PWR_LIM
@ LT8722_PWR_LIM
Definition: iio_lt8722.c:215
LT8722_SWEN_PIN
@ LT8722_SWEN_PIN
Definition: iio_lt8722.c:240
no_os_alloc.h
END_ATTRIBUTES_ARRAY
#define END_ATTRIBUTES_ARRAY
Definition: iio_types.h:116
LT8722_AMUX_TEST_MASK
#define LT8722_AMUX_TEST_MASK
Definition: lt8722.h:162
LT8722_SW_VC_INT
@ LT8722_SW_VC_INT
Definition: iio_lt8722.c:213
LT8722_SPIS_COMMAND_MASK
#define LT8722_SPIS_COMMAND_MASK
Definition: lt8722.h:87
LT8722_OVER_CURRENT
@ LT8722_OVER_CURRENT
Definition: iio_lt8722.c:224
LT8722_AOUT_EN_MASK
#define LT8722_AOUT_EN_MASK
Definition: lt8722.h:163
IIO_VAL_INT
@ IIO_VAL_INT
Definition: iio_types.h:50
iio_channel
Struct describing the scan type.
Definition: iio_types.h:168
LT8722_ENABLE_REQ
@ LT8722_ENABLE_REQ
Definition: iio_lt8722.c:207
LT8722_MIN_OT
@ LT8722_MIN_OT
Definition: iio_lt8722.c:222
iio_device::channels
struct iio_channel * channels
Definition: iio_types.h:254
LT8722_SWEN
@ LT8722_SWEN
Definition: iio_lt8722.c:219
LT8722_SWEN_REQ
@ LT8722_SWEN_REQ
Definition: iio_lt8722.c:208
lt8722_get_spis_dac_ilimp
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
LT8722_SYS_DC_MASK
#define LT8722_SYS_DC_MASK
Definition: lt8722.h:111
lt8722_iio_init
int lt8722_iio_init(struct lt8722_iio_dev **, struct lt8722_iio_dev_init_param *)
Initializes the LT8722 IIO descriptor.
Definition: iio_lt8722.c:1841
lt8722_iio_init
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
iio_ch_info
Structure holding channel attributess.
Definition: iio_types.h:103
lt8722_reg_read
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
@ LT8722_SPI_RST
Definition: iio_lt8722.c:214
no_os_units.h
Header file of Units.
lt8722_set_spis_dac_ilimn
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
lt8722_reg_write_mask
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
lt8722_iio_remove
int lt8722_iio_remove(struct lt8722_iio_dev *)
Free resources allocated by the init function.
Definition: iio_lt8722.c:1876
lt8722_get_spis_dac_ilimn
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
lt8722_iio_dev_init_param
Structure holding the LT8722 IIO initalization parameter.
Definition: iio_lt8722.h:53
lt8722_iio_spis_amux_attrs
lt8722_iio_spis_amux_attrs
Definition: iio_lt8722.c:232
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
LT8722_SRVO_ILIM_MASK
#define LT8722_SRVO_ILIM_MASK
Definition: lt8722.h:123
lt8722_iio_attr_avail
Structure holding the available values for an attribute.
Definition: iio_lt8722.c:48
LT8722_SRVO_PLIM
@ LT8722_SRVO_PLIM
Definition: iio_lt8722.c:221
lt8722_iio_get_command_available
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
lt8722_set_spis_ov_clamp
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
lt8722_set_dac
int lt8722_set_dac(struct lt8722_dev *dev, uint32_t value)
Set DAC code of LT8722 device.
Definition: lt8722.c:686
LT8722_VDDIO_UVLO
@ LT8722_VDDIO_UVLO
Definition: iio_lt8722.c:227
lt8722_iio_get_mask_command
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
no_os_div_s64
int64_t no_os_div_s64(int64_t dividend, int32_t divisor)
LT8722_VCC_UVLO_MASK
#define LT8722_VCC_UVLO_MASK
Definition: lt8722.h:129
lt8722_init_param
Initialization parameter for the LT8722 device.
Definition: lt8722.h:362
LT8722_SPIS_AMUX_MASK
#define LT8722_SPIS_AMUX_MASK
Definition: lt8722.h:94
lt8722_get_spis_uv_clamp
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
LT8722_SWEN_MASK
#define LT8722_SWEN_MASK
Definition: lt8722.h:122
iio.h
Header file of iio.
no_os_error.h
Error codes definition.
lt8722_iio_attr_avail::alt_values
const char *const * alt_values
Definition: iio_lt8722.c:51
LT8722_VCC_VREG_MASK
#define LT8722_VCC_VREG_MASK
Definition: lt8722.h:112
LT8722_VCC_UVLO
@ LT8722_VCC_UVLO
Definition: iio_lt8722.c:226
iio_attribute::name
const char * name
Definition: iio_types.h:131
LT8722_TSD_MASK
#define LT8722_TSD_MASK
Definition: lt8722.h:128
iio_channel::name
const char * name
Definition: iio_types.h:170
LT8722_SRVO_ILIM
@ LT8722_SRVO_ILIM
Definition: iio_lt8722.c:220
lt8722.h
Header file for the LT8722 Driver.
lt8722_set_spis_dac_ilimp
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
iio_lt8722.h
Header file for the LT8722 IIO Driver.
LT8722_SPIS_STATUS
#define LT8722_SPIS_STATUS
Definition: lt8722.h:68
lt8722_iio_spis_command_attrs
lt8722_iio_spis_command_attrs
Definition: iio_lt8722.c:206
LT8722_AMUX_TEST
@ LT8722_AMUX_TEST
Definition: iio_lt8722.c:234
lt8722_iio_dev_init_param::lt8722_init_param
struct lt8722_init_param * lt8722_init_param
Definition: iio_lt8722.h:54
lt8722_set_swen_pin
int lt8722_set_swen_pin(struct lt8722_dev *dev, uint8_t value)
Set SWEN pin of LT8722 device.
Definition: lt8722.c:970
LT8722_PWR_LIM_MASK
#define LT8722_PWR_LIM_MASK
Definition: lt8722.h:116
lt8722_iio_get_amux_available
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
iio_attribute
Structure holding pointers to show and store functions.
Definition: iio_types.h:129
lt8722_iio_attr_avail::values
const char *const * values
Definition: iio_lt8722.c:50
lt8722_remove
int lt8722_remove(struct lt8722_dev *dev)
Free the resources allocated by the lt8722_init()
Definition: lt8722.c:1148
LT8722_OVER_CURRENT_MASK
#define LT8722_OVER_CURRENT_MASK
Definition: lt8722.h:127
lt8722_iio_dev::iio_dev
struct iio_device * iio_dev
Definition: iio_lt8722.h:46
lt8722_iio_dev::lt8722_dev
struct lt8722_dev * lt8722_dev
Definition: iio_lt8722.h:45
LT8722_SW_FRQ_SET
@ LT8722_SW_FRQ_SET
Definition: iio_lt8722.c:209
LT8722_SW_VC_INT_MASK
#define LT8722_SW_VC_INT_MASK
Definition: lt8722.h:113
lt8722_iio_pins
lt8722_iio_pins
Definition: iio_lt8722.c:238
iio_parse_value
int32_t iio_parse_value(char *buf, enum iio_val fmt, int32_t *val, int32_t *val2)
Definition: iio.c:630
LT8722_MIN_OT_MASK
#define LT8722_MIN_OT_MASK
Definition: lt8722.h:125
LT8722_V2P5_UVLO_MASK
#define LT8722_V2P5_UVLO_MASK
Definition: lt8722.h:132
LT8722_AOUT_EN
@ LT8722_AOUT_EN
Definition: iio_lt8722.c:235
LT8722_SPIS_COMMAND
#define LT8722_SPIS_COMMAND
Definition: lt8722.h:67
IIO_VOLTAGE
@ IIO_VOLTAGE
Definition: iio_types.h:65
lt8722_set_spis_uv_clamp
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
lt8722_get_output_voltage
int lt8722_get_output_voltage(struct lt8722_dev *dev, int64_t *value)
Get output volatge of LT8722 device.
Definition: lt8722.c:912
lt8722_set_en_pin
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
@ LT8722_VCC_VREG
Definition: iio_lt8722.c:212
LT8722_POR_OCC
@ LT8722_POR_OCC
Definition: iio_lt8722.c:223
LT8722_SPI_RST_MASK
#define LT8722_SPI_RST_MASK
Definition: lt8722.h:114
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
no_os_field_get
uint32_t no_os_field_get(uint32_t mask, uint32_t word)
lt8722_get_dac
int lt8722_get_dac(struct lt8722_dev *dev, uint32_t *value)
Get DAC code of LT8722 device.
Definition: lt8722.c:701
iio_channel::attributes
struct iio_attribute * attributes
Definition: iio_types.h:186
LT8722_CP_UVLO
@ LT8722_CP_UVLO
Definition: iio_lt8722.c:228
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
LT8722_SRVO_PLIM_MASK
#define LT8722_SRVO_PLIM_MASK
Definition: lt8722.h:124
LT8722_SW_FRQ_ADJ
@ LT8722_SW_FRQ_ADJ
Definition: iio_lt8722.c:210
lt8722_iio_attr_avail::num_values
int num_values
Definition: iio_lt8722.c:49
lt8722_reg_write
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
@ LT8722_SYS_DC
Definition: iio_lt8722.c:211
NULL
#define NULL
Definition: wrapper.h:64
lt8722_get_spis_ov_clamp
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
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
lt8722_iio_spis_status_attrs
lt8722_iio_spis_status_attrs
Definition: iio_lt8722.c:218
LT8722_AMUX_MASK
#define LT8722_AMUX_MASK
Definition: lt8722.h:161
LT8722_EN_PIN
@ LT8722_EN_PIN
Definition: iio_lt8722.c:239
LT8722_V2P5_UVLO
@ LT8722_V2P5_UVLO
Definition: iio_lt8722.c:229
LT8722_SWEN_REQ_MASK
#define LT8722_SWEN_REQ_MASK
Definition: lt8722.h:108
lt8722_set_output_voltage
int lt8722_set_output_voltage(struct lt8722_dev *dev, int64_t value)
Set output volatge of LT8722 device.
Definition: lt8722.c:892
lt8722_get_swen_pin
int lt8722_get_swen_pin(struct lt8722_dev *dev, uint8_t *value)
Get SWEN pin of LT8722 device.
Definition: lt8722.c:984
lt8722_iio_get_status_attr_available
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
LT8722_SW_FRQ_SET_MASK
#define LT8722_SW_FRQ_SET_MASK
Definition: lt8722.h:109
lt8722_iio_dev
Structure holding the LT8722 IIO device descriptor.
Definition: iio_lt8722.h:44
no_os_util.h
Header file of utility functions.
LT8722_CP_UVLO_MASK
#define LT8722_CP_UVLO_MASK
Definition: lt8722.h:131
LT8722_VDDIO_UVLO_MASK
#define LT8722_VDDIO_UVLO_MASK
Definition: lt8722.h:130
lt8722_get_en_pin
int lt8722_get_en_pin(struct lt8722_dev *dev, uint8_t *value)
Get EN pin of LT8722 device.
Definition: lt8722.c:1012
LT8722_TSD
@ LT8722_TSD
Definition: iio_lt8722.c:225
LT8722_SW_FRQ_ADJ_MASK
#define LT8722_SW_FRQ_ADJ_MASK
Definition: lt8722.h:110
lt8722_iio_get_mask_status
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
@ LT8722_AMUX
Definition: iio_lt8722.c:233
lt8722_iio_get_mask_amux
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
LT8722_SPIS_AMUX
#define LT8722_SPIS_AMUX
Definition: lt8722.h:74
errno.h
Error macro definition for ARM Compiler.
lt8722_get_amux
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
lt8722_init
int lt8722_init(struct lt8722_dev **device, struct lt8722_init_param *init_param)
Initialize the LT8722 device.
Definition: lt8722.c:1027
LT8722_POR_OCC_MASK
#define LT8722_POR_OCC_MASK
Definition: lt8722.h:126