![]() |
no-OS
|
Source file for the ADP1055 Driver. More...
#include "adp1055.h"#include "no_os_error.h"#include "no_os_util.h"#include "no_os_alloc.h"#include "no_os_delay.h"Functions | |
| int | adp1055_send_command (struct adp1055_desc *desc, uint16_t command) |
| Send command byte/word to ADP1055. | |
| int | adp1055_write (struct adp1055_desc *desc, uint16_t command, uint16_t data, uint8_t byte_num) |
| |
| int | adp1055_read (struct adp1055_desc *desc, uint16_t command, uint8_t *data, uint8_t byte_num) |
| Read data from ADP1055. | |
| int | adp1055_init (struct adp1055_desc **desc, struct adp1055_init_param *init_param) |
| Initialize the ADP1055 device. | |
| int | adp1055_remove (struct adp1055_desc *desc) |
| Free the resources allocated by the adp1055_init() | |
| int | adp1055_read_status (struct adp1055_desc *desc, enum adp1055_status_type status, uint16_t *status_val) |
| Send statuses. | |
| int | adp1055_read_value (struct adp1055_desc *desc, enum adp1055_value_type value, uint16_t *mant, uint8_t *exp) |
| Read VIN/IIN/VOUT/TEMP2/TEMP3/DUTY_CYCLE_FREQ/POUT raw value from the ADP1055. | |
| int | adp1055_read_vsense (struct adp1055_desc *desc, uint16_t *vsense) |
| Read Voltage Sense output raw value from the ADP1055. | |
| int | adp1055_vout_value (struct adp1055_desc *desc, uint16_t vout_command, uint16_t vout_max) |
| Set VOUT_COMMAND and VOUT_MAX values. | |
| int | adp1055_vout_offset (struct adp1055_desc *desc, int16_t vout_offset) |
| Set output voltage offset. | |
| int | adp1055_vout_tr (struct adp1055_desc *desc, uint8_t exp, uint16_t mant) |
| Set ADP1055 VOUT transition rate. | |
| int | adp1055_vout_droop (struct adp1055_desc *desc, uint8_t exp, uint16_t mant) |
| Set ADP1055 Vout Droop. | |
| int | adp1055_vout_scale_loop (struct adp1055_desc *desc, uint8_t exp, uint16_t mant) |
| Set ADP1055 vout scale loop. | |
| int | adp1055_vout_scale (struct adp1055_desc *desc, uint8_t exp, uint16_t mant) |
| Set ADP1055 VOUT_SCALE_MONITOR. | |
| int | adp1055_set_vin (struct adp1055_desc *desc, int16_t mant, int8_t exp, bool state_on) |
| Set ADP1055 VIN on/off raw value for input voltage limiting. | |
| int | adp1055_iout_cal_gain (struct adp1055_desc *desc, int16_t mant, int8_t exp) |
| Set ADP1055 IOUT calibration gain. | |
| int | adp1055_iout_cal_offset (struct adp1055_desc *desc, int16_t mant, int8_t exp) |
| Set ADP1055 IOUT calibration offset. | |
| int | adp1055_normal_mode_df (struct adp1055_desc *desc, uint8_t zero, uint8_t pole, uint8_t lf, uint8_t hf) |
| Set ADP1055 Normal Mode Digital Filter. | |
| int | adp1055_lightload_mode_df (struct adp1055_desc *desc, uint8_t zero, uint8_t pole, uint8_t lf, uint8_t hf) |
| Set ADP1055 Light Load Mode Digital Filter. | |
| int | adp1055_singleshot_mode_df (struct adp1055_desc *desc, uint8_t zero, uint8_t pole, uint8_t lf, uint8_t hf) |
| Set ADP1055 Single Shot Digital Filter. | |
| int | adp1055_pwm_config (struct adp1055_desc *desc, uint16_t pulse_width, uint16_t pulse_start, bool mod_en, bool mod_sign, enum adp1055_channel chan) |
| PWM modulation configuration for the ADP1055. | |
| int | adp1055_set_pwm (struct adp1055_desc *desc, enum adp1055_channel chan, int8_t exp, uint16_t mant) |
| Set PWM channel and frequency. | |
| int | adp1055_freq_sync (struct adp1055_desc *desc, bool pll, bool reso) |
| Frequency synchronization of the PWM clock with an external clock Requires syni_desc to be initialized. | |
Source file for the ADP1055 Driver.
Copyright 2025(c) Analog Devices, Inc.
SPDX-License-Identifier: BSD-3-Clause
| int adp1055_freq_sync | ( | struct adp1055_desc * | desc, |
| bool | pll, | ||
| bool | reso ) |
Frequency synchronization of the PWM clock with an external clock Requires syni_desc to be initialized.
| desc | - ADP1055 device descriptor |
| pll | - pll disable and enable |
| reso | - 5ns resolution enable |
| int adp1055_init | ( | struct adp1055_desc ** | desc, |
| struct adp1055_init_param * | init_param ) |
Initialize the ADP1055 device.
| desc | - ADP1055 device descriptor |
| init_param | - Initialization parameter containing information about the ADP1055 device to be initialized. |
| int adp1055_iout_cal_gain | ( | struct adp1055_desc * | desc, |
| int16_t | mant, | ||
| int8_t | exp ) |
Set ADP1055 IOUT calibration gain.
| desc | - ADP1055 deveice descriptor |
| mant | - Mantissa value to be transmitted, 11-bit twos compliment |
| exp | - Exponent value to be transmitted, 5-bit twos compliment |
| int adp1055_iout_cal_offset | ( | struct adp1055_desc * | desc, |
| int16_t | mant, | ||
| int8_t | exp ) |
Set ADP1055 IOUT calibration offset.
| desc | - ADP1055 deveice descriptor |
| mant | - Mantissa value to be transmitted, 11-bit twos compliment |
| exp | - Exponent value to be transmitted, 5-bit twos compliment |
| int adp1055_lightload_mode_df | ( | struct adp1055_desc * | desc, |
| uint8_t | zero, | ||
| uint8_t | pole, | ||
| uint8_t | lf, | ||
| uint8_t | hf ) |
Set ADP1055 Light Load Mode Digital Filter.
| desc | - ADP1055 device descriptor |
| zero | - light mode zero settings. |
| pole | - light mode pole settings. |
| lf | - light mode low filter gain settings. |
| hf | - light mode high filter gain settings. |
| int adp1055_normal_mode_df | ( | struct adp1055_desc * | desc, |
| uint8_t | zero, | ||
| uint8_t | pole, | ||
| uint8_t | lf, | ||
| uint8_t | hf ) |
Set ADP1055 Normal Mode Digital Filter.
| desc | - ADP1055 device descriptor |
| zero | - light mode zero settings. |
| pole | - light mode pole settings. |
| lf | - light mode low filter gain settings. |
| hf | - light mode high filter gain settings. |
| int adp1055_pwm_config | ( | struct adp1055_desc * | desc, |
| uint16_t | pulse_width, | ||
| uint16_t | pulse_start, | ||
| bool | mod_en, | ||
| bool | mod_sign, | ||
| enum adp1055_channel | chan ) |
PWM modulation configuration for the ADP1055.
| desc | - ADP1055 device descriptor |
| pulse_width | - Width of the pulse wanted for the signal (used for calculation of the 12-bit rising and falling edge timings for the requested channels, it depends on each channel how the falling and rising edges are calculated using this value). Each LSB corresponds to a 5ns resolution. |
| pulse_start | - Start of the pulse wanted for the signal (used for calculation of the 12-bit rising and falling edge timings for the requested channels, it depends on each channel how the falling and rising edges are calculated using this value). Each LSB corresponds to a 5ns resolution. |
| mod_en | - boolian for modulation enable |
| mod_sign | - bolian for modulation sign |
| chan | - requested channel |
| int adp1055_read | ( | struct adp1055_desc * | desc, |
| uint16_t | command, | ||
| uint8_t * | data, | ||
| uint8_t | byte_num ) |
Read data from ADP1055.
| desc | - ADP1055 device descriptor |
| command | - Command value |
| data | - Buffer with received data |
| byte_num | - Number of bytes of received data |
| int adp1055_read_status | ( | struct adp1055_desc * | desc, |
| enum adp1055_status_type | status, | ||
| uint16_t * | status_val ) |
Send statuses.
| desc | - ADP1055 device descriptor |
| status | - Status type |
| status_val | - Status value to be returned |
| int adp1055_read_value | ( | struct adp1055_desc * | desc, |
| enum adp1055_value_type | value, | ||
| uint16_t * | mant, | ||
| uint8_t * | exp ) |
Read VIN/IIN/VOUT/TEMP2/TEMP3/DUTY_CYCLE_FREQ/POUT raw value from the ADP1055.
| desc | - AP1055 device descriptor |
| value | - value type |
| mant | - Raw mantissa value to be received |
| exp | - Raw exponent value to be received |
| int adp1055_read_vsense | ( | struct adp1055_desc * | desc, |
| uint16_t * | vsense ) |
Read Voltage Sense output raw value from the ADP1055.
| desc | - ADP1055 device descriptor |
| vsense | - VS(VOUT) raw value to be received of the parallel circuit. |
| int adp1055_remove | ( | struct adp1055_desc * | desc | ) |
Free the resources allocated by the adp1055_init()
| desc | - ADP1055 device descriptor |
| int adp1055_send_command | ( | struct adp1055_desc * | desc, |
| uint16_t | command ) |
Send command byte/word to ADP1055.
| desc | - ADP1055 device descriptor |
| command | - Value of the command |
| int adp1055_set_pwm | ( | struct adp1055_desc * | desc, |
| enum adp1055_channel | chan, | ||
| int8_t | exp, | ||
| uint16_t | mant ) |
Set PWM channel and frequency.
| desc | - ADP1055 device descriptor |
| chan | - Selected channel |
| exp | - 5-bit twos compliment (-4 to 0) |
| mant | - 11-bit twos compliment |
| int adp1055_set_vin | ( | struct adp1055_desc * | desc, |
| int16_t | mant, | ||
| int8_t | exp, | ||
| bool | state_on ) |
Set ADP1055 VIN on/off raw value for input voltage limiting.
| desc | - ADP1055 device descriptor |
| mant | - Mantissa value to be transmitted, 11 bit twos complement. |
| exp | - Exponent value to be transmitted, 5 bit twos complement. |
| state_on | - true - Set VIN_ON. false - Set VIN_OFF. |
| int adp1055_singleshot_mode_df | ( | struct adp1055_desc * | desc, |
| uint8_t | zero, | ||
| uint8_t | pole, | ||
| uint8_t | lf, | ||
| uint8_t | hf ) |
Set ADP1055 Single Shot Digital Filter.
| desc | - ADP1055 device descriptor |
| zero | - light mode zero settings. |
| pole | - light mode pole settings. |
| lf | - light mode low filter gain settings. |
| hf | - light mode high filter gain settings. |
| int adp1055_vout_droop | ( | struct adp1055_desc * | desc, |
| uint8_t | exp, | ||
| uint16_t | mant ) |
Set ADP1055 Vout Droop.
| desc | - ADP1055 device descriptor |
| exp | - Exponent 5-bit two's compliment |
| mant | - Mantissa 11-bit two's compliment |
| int adp1055_vout_offset | ( | struct adp1055_desc * | desc, |
| int16_t | vout_offset ) |
Set output voltage offset.
| desc | - ADP1055 device descriptor |
| vout_offset | - VOUT offset value. |
| int adp1055_vout_scale | ( | struct adp1055_desc * | desc, |
| uint8_t | exp, | ||
| uint16_t | mant ) |
Set ADP1055 VOUT_SCALE_MONITOR.
| desc | - ADP1055 device descriptor |
| exp | - Exponent - 5-bit twos complement |
| mant | - Mantissa - 11-bit twos complement |
| int adp1055_vout_scale_loop | ( | struct adp1055_desc * | desc, |
| uint8_t | exp, | ||
| uint16_t | mant ) |
Set ADP1055 vout scale loop.
| desc | - ADP1055 device descriptor |
| exp | - Exponent 5-bit two's compliment |
| mant | - Mantissa 11-bit two's compliment |
| int adp1055_vout_tr | ( | struct adp1055_desc * | desc, |
| uint8_t | exp, | ||
| uint16_t | mant ) |
Set ADP1055 VOUT transition rate.
| desc | - ADP1055 device descriptor |
| exp | - Exponent - 5-bit twos complement |
| mant | - Mantissa - 11-bit twos complement |
| int adp1055_vout_value | ( | struct adp1055_desc * | desc, |
| uint16_t | vout_command, | ||
| uint16_t | vout_max ) |
Set VOUT_COMMAND and VOUT_MAX values.
| desc | - ADP1055 descriptor |
| vout_command | - VOUT_COMMAND value |
| vout_max | - VOUT_MAX value |
| int adp1055_write | ( | struct adp1055_desc * | desc, |
| uint16_t | command, | ||
| uint16_t | data, | ||
| uint8_t | byte_num ) |
| desc | - ADP1055 device structure |
| command | - Command value |
| data | - Data value to write in ADP1055 |
| byte_num | - Number of bytes to write. |