#define ADP1050_SR1_SR2_MODULATION_SETTINGS
Definition: adp1050.h:346
int adp1050_remove(struct adp1050_desc *desc)
Free the resources allocated by the adp1050_init()
Definition: adp1050.c:1166
int adp1050_set_close_loop(struct adp1050_desc *desc)
Set close loop operation.
Definition: adp1050.c:654
int16_t no_os_sign_extend16(uint16_t value, int index)
#define END_ATTRIBUTES_ARRAY
Definition: iio_types.h:116
@ ADP1050_IIO_IIN_CHAN
Definition: iio_adp1050.c:189
#define ADP1050_IIO_MODULATION_AVAIL_MASK(x)
Definition: iio_adp1050.c:48
@ ADP1050_IIO_OUTB_CHAN
Definition: iio_adp1050.c:196
@ IIO_VAL_INT
Definition: iio_types.h:50
Struct describing the scan type.
Definition: iio_types.h:168
int adp1050_iio_remove(struct adp1050_iio_desc *)
Free resources allocated by the init function.
Definition: iio_adp1050.c:1269
#define ADP1050_FEEDFORWARD_OL_ENABLE
Definition: adp1050.h:148
struct iio_device * iio_dev
Definition: iio_adp1050.h:45
adp1050_iio_output_chan_type
Definition: iio_adp1050.c:194
adp1050_iio_input_chan_type
Definition: iio_adp1050.c:187
adp1050_mod
Definition: adp1050.h:403
#define ADP1050_IIO_FLOAT_FREQ_ENUM(x)
Definition: iio_adp1050.c:46
@ IIO_VAL_FRACTIONAL_LOG2
Definition: iio_types.h:56
@ ADP1050_DUTY_CYCLE
Definition: adp1050.h:524
struct adp1050_desc * adp1050_desc
Definition: iio_adp1050.h:44
@ ADP1050_CLOSE_LOOP
Definition: adp1050.h:391
@ ADP1050_IIN
Definition: adp1050.h:522
Structure holding channel attributess.
Definition: iio_types.h:103
enum adp1050_loop loop
Definition: adp1050.h:564
adp1050_iio_vout_value_type
Definition: iio_adp1050.c:179
int adp1050_read(struct adp1050_desc *desc, uint16_t command, uint8_t *data, uint8_t bytes_number)
Read data from ADP1050.
Definition: adp1050.c:74
int adp1050_read_vsense(struct adp1050_desc *desc, uint16_t *vsense)
Read Voltage Sense output raw value from the ADP1050.
Definition: adp1050.c:184
@ ADP1050_IIO_VOUT_COMMAND_VALUE
Definition: iio_adp1050.c:180
#define ADP1050_MARGIN_HIGH
Definition: adp1050.h:79
#define ADP1050_IIO_ENABLE_MASK(x)
Definition: iio_adp1050.c:57
uint16_t iin_scale_monitor
Definition: iio_adp1050.h:55
@ ADP1050_STATUS_TEMPERATURE_TYPE
Definition: adp1050.h:532
#define ADP1050_SYNCH_GENERAL_SETTINGS
Definition: adp1050.h:295
int adp1050_write(struct adp1050_desc *desc, uint16_t command, uint16_t data, uint8_t bytes_number)
Write data to ADP1050.
Definition: adp1050.c:108
Header file for the ADP1050 Driver.
#define ADP1050_IIO_OUT_MASK
Definition: iio_adp1050.c:56
#define ADP1050_PULSE_SKIPPING_ENABLE
Definition: adp1050.h:150
#define ADP1050_IIO_OUTPUT_CHANNELS
Definition: iio_adp1050.c:50
Structure holding the ADP1050 IIO device descriptor.
Definition: iio_adp1050.h:43
#define ADP1050_MANT_MASK
Definition: adp1050.h:84
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
int adp1050_pwm_duty_cycle(struct adp1050_desc *desc, uint16_t pulse_width, uint16_t pulse_start, enum adp1050_channel chan)
Set VOUT duty cycle for requested channel.
Definition: adp1050.c:324
#define ADP1050_TRIM_DEFAULT_PASS
Definition: adp1050.h:138
#define ADP1050_DUTY_CYCLE_READING_SETTINGS
Definition: adp1050.h:355
int adp1050_iio_init(struct adp1050_iio_desc **iio_desc, struct adp1050_iio_desc_init_param *init_param)
Initializes the ADP1050 IIO descriptor.
Definition: iio_adp1050.c:1203
int adp1050_vout_offset(struct adp1050_desc *desc, int16_t vout_offset)
Set output voltage offset.
Definition: adp1050.c:249
#define ADP1050_CHIP_DEFAULT_PASS
Definition: adp1050.h:135
@ ADP1050_IIO_VOUT_OFFSET_VALUE
Definition: iio_adp1050.c:184
int adp1050_set_pwm(struct adp1050_desc *desc, enum adp1050_channel chan, enum adp1050_freq freq)
Set PWM channel and frequency.
Definition: adp1050.c:471
int adp1050_freq_sync(struct adp1050_desc *desc, bool state_on)
Frequency synchronization of the PWM clock with an external clock Requires syni_desc to be initialize...
Definition: adp1050.c:736
#define ADP1050_IIO_FLOAT_FREQ_INDEX
Definition: iio_adp1050.c:44
@ ADP1050_IIO_VIN_CHAN
Definition: iio_adp1050.c:188
@ ADP1050_IIO_OUT_ENABLE
Definition: iio_adp1050.c:173
@ IIO_SHARED_BY_ALL
Definition: iio_types.h:122
@ ADP1050_IIO_TEMP_CHAN
Definition: iio_adp1050.c:191
uint32_t no_os_field_prep(uint32_t mask, uint32_t val)
#define ADP1050_VOUT_MARGIN_LOW
Definition: adp1050.h:206
@ ADP1050_IIO_VOUT_MARGIN_HIGH_VALUE
Definition: iio_adp1050.c:182
@ ADP1050_IIO_SR1_CHAN
Definition: iio_adp1050.c:197
@ ADP1050_IIO_SR2_CHAN
Definition: iio_adp1050.c:198
@ ADP1050_VIN
Definition: adp1050.h:521
int adp1050_pulse_skipping(struct adp1050_desc *desc, uint8_t pulse_threshold, bool state_on)
Enable or disbale the pulse skipping mode.
Definition: adp1050.c:681
const char * name
Definition: iio_types.h:131
@ ADP1050_IIO_VOUT_MARGIN_LOW_VALUE
Definition: iio_adp1050.c:181
#define ADP1050_IIO_OUTA_DUTY_CYCLE_REPORTING
Definition: iio_adp1050.c:52
@ ADP1050_IIO_FREQ_SYNC_ENABLE
Definition: iio_adp1050.c:176
const char * name
Definition: iio_types.h:170
@ ADP1050_TEMP
Definition: adp1050.h:523
#define ADP1050_IIO_OUTA_OUTB_MASK
Definition: iio_adp1050.c:54
#define ADP1050_VOUT_SCALE_MONITOR
Definition: adp1050.h:209
Structure holding pointers to show and store functions.
Definition: iio_types.h:129
uint16_t vout_scale_monitor
Definition: iio_adp1050.h:53
#define ADP1050_IIO_FLOAT_FREQ(x)
Definition: iio_adp1050.c:45
Structure holding the ADP1050 IIO initalization parameter.
Definition: iio_adp1050.h:51
@ ADP1050_IIO_FEEDFORWARD_ENABLE
Definition: iio_adp1050.c:174
int adp1050_vout_value(struct adp1050_desc *desc, uint16_t vout_command, uint16_t vout_max)
Set VOUT_COMMAND and VOUT_MAX values.
Definition: adp1050.c:231
@ ADP1050_STATUS_WORD_TYPE
Definition: adp1050.h:531
#define ADP1050_MSB_MASK
Definition: adp1050.h:49
int adp1050_read_status(struct adp1050_desc *desc, enum adp1050_status_type status, uint16_t *status_val)
Read statuses.
Definition: adp1050.c:145
@ IIO_CURRENT
Definition: iio_types.h:66
int32_t iio_parse_value(char *buf, enum iio_val fmt, int32_t *val, int32_t *val2)
Definition: iio.c:630
adp1050_freq
Definition: adp1050.h:416
@ IIO_VOLTAGE
Definition: iio_types.h:65
#define ADP1050_VOUT_MARGIN_HIGH
Definition: adp1050.h:205
#define ADP1050_EEPROM_DEFAULT_PASS
Definition: adp1050.h:137
#define ADP1050_FEEDFORWARD_CL_ENABLE
Definition: adp1050.h:147
Device descriptor for ADP1050.
Definition: adp1050.h:558
int adp1050_set_feedforward(struct adp1050_desc *desc, bool state_on)
Enable or disable voltage input feedforward for edge modulation.
Definition: adp1050.c:712
#define ADP1050_VIN_SCALE_MONITOR
Definition: adp1050.h:265
#define ADP1050_IIO_MODULATION_AVAIL_SELECT(x)
Definition: iio_adp1050.c:49
@ ADP1050_STATUS_CML_TYPE
Definition: adp1050.h:533
@ ADP1050_STATUS_VOUT_TYPE
Definition: adp1050.h:529
int adp1050_unlock_pass(struct adp1050_desc *desc, uint16_t password, enum adp1050_pass_type pass_type)
Unlock CHIP/EEPROM/TRIM password.
Definition: adp1050.c:935
int iio_format_value(char *buf, uint32_t len, enum iio_val fmt, int32_t size, int32_t *vals)
Definition: iio.c:686
Header file for the ADP1050 IIO Driver.
uint32_t address
Definition: iio_types.h:113
uint32_t no_os_field_get(uint32_t mask, uint32_t word)
struct iio_attribute * attributes
Definition: iio_types.h:186
uint16_t vin_scale_monitor
Definition: iio_adp1050.h:54
uint16_t num_ch
Definition: iio_types.h:252
int adp1050_iio_init(struct adp1050_iio_desc **, struct adp1050_iio_desc_init_param *)
Initializes the ADP1050 IIO descriptor.
Definition: iio_adp1050.c:1203
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 ADP1050_VOUT_CAL_OFFSET
Definition: adp1050.h:203
uint16_t no_os_get_unaligned_le16(uint8_t *buf)
@ ADP1050_DISABLE_ALL
Definition: adp1050.h:400
#define ADP1050_VOUT_COMMAND
Definition: adp1050.h:201
@ IIO_TEMP
Definition: iio_types.h:69
@ ADP1050_EEPROM_PASS
Definition: adp1050.h:412
#define NULL
Definition: wrapper.h:64
#define ADP1050_FEEDFORWARD_SS_FILTER_GAIN
Definition: adp1050.h:330
@ ADP1050_IIO_VOUT_CHAN
Definition: iio_adp1050.c:190
#define ADP1050_IIO_MODULATION_AVAIL_SIZE
Definition: iio_adp1050.c:47
#define ADP1050_OUTA_OUTB_MODULATION_SETTINGS
Definition: adp1050.h:345
#define ADP1050_IIN_SCALE_MONITOR
Definition: adp1050.h:266
struct ad7616_init_param init_param
Definition: ad7616_sdz.c:113
Structure holding channels and attributes of a device.
Definition: iio_types.h:247
#define ADP1050_EXP_MASK
Definition: adp1050.h:83
#define ADP1050_MARGIN_LOW
Definition: adp1050.h:78
#define ADP1050_IIO_OUTB_DUTY_CYCLE_REPORTING
Definition: iio_adp1050.c:53
int adp1050_set_open_loop(struct adp1050_desc *desc, uint8_t rising_edge, uint8_t falling_edge, enum adp1050_channel chan)
Set requested ADP1050 channel in Open Loop operation mode.
Definition: adp1050.c:589
#define ADP1050_IIO_PULSE_DEFAULT_VAL
Definition: iio_adp1050.c:58
@ ADP1050_IIO_OUTA_CHAN
Definition: iio_adp1050.c:195
int adp1050_pwm_modulation(struct adp1050_desc *desc, enum adp1050_mod mod, enum adp1050_channel chan, bool sign)
Set PWM modulation for requested channel.
Definition: adp1050.c:416
Initialization parameter for the ADP1050 device.
Definition: adp1050.h:545
#define ADP1050_PWM_OUTPUT_DISABLE
Definition: adp1050.h:347
#define ADP1050_IIO_SR1_SR2_MASK
Definition: iio_adp1050.c:55
#define ADP1050_FREQ_SYNC_ON
Definition: adp1050.h:128
Header file of utility functions.
int adp1050_read_value(struct adp1050_desc *desc, uint16_t *mant, uint8_t *exp, enum adp1050_value_type val_type)
Read VIN/IIN/TEMP/DUTY_CYCLE/FREQ raw value from the ADP1050.
Definition: adp1050.c:206
int adp1050_init(struct adp1050_desc **desc, struct adp1050_init_param *init_param)
Initialize the ADP1050 device.
Definition: adp1050.c:1079
enum adp1050_freq freq
Definition: adp1050.h:565
int adp1050_iio_remove(struct adp1050_iio_desc *iio_desc)
Free resources allocated by the init function.
Definition: iio_adp1050.c:1269
#define ADP1050_IIO_OUTPUT_CHANNEL(x)
Definition: iio_adp1050.c:51
int adp1050_vout_scale(struct adp1050_desc *desc, int8_t exp, uint16_t mant)
Set ADP1050 VOUT scale, regarding the resistor divider assigned to the VS pins.
Definition: adp1050.c:273
@ ADP1050_OPEN_LOOP
Definition: adp1050.h:392
#define ADP1050_OL_OPERATION_SETTINGS
Definition: adp1050.h:364
@ ADP1050_TRIM_PASS
Definition: adp1050.h:413
@ ADP1050_IIO_VOUT_SCALE_MONITOR_VALUE
Definition: iio_adp1050.c:183
@ ADP1050_IIO_PULSE_ENABLE
Definition: iio_adp1050.c:175
adp1050_iio_enable_type
Definition: iio_adp1050.c:172
@ ADP1050_CHIP_PASS
Definition: adp1050.h:411
#define ADP1050_LSB_MASK
Definition: adp1050.h:48
struct adp1050_init_param * adp1050_init_param
Definition: iio_adp1050.h:52
@ ADP1050_STATUS_INPUT_TYPE
Definition: adp1050.h:530