Go to the documentation of this file.
57 #define LT7170_PAGE 0x00
58 #define LT7170_OPERATION 0x01
59 #define LT7170_ON_OFF_CONFIG 0x02
60 #define LT7170_CLEAR_FAULTS 0x03
61 #define LT7170_PAGE_PLUS_WRITE 0x05
62 #define LT7170_PAGE_PLUS_READ 0x06
63 #define LT7170_ZONE_CONFIG 0x07
64 #define LT7170_ZONE_ACTIVE 0x08
66 #define LT7170_WRITE_PROTECT 0x10
68 #define LT7170_STORE_USER_ALL 0x15
69 #define LT7170_RESTORE_USER_ALL 0x16
71 #define LT7170_CAPABILITY 0x19
72 #define LT7170_QUERY 0x1A
73 #define LT7170_SMBALERT_MASK 0x1B
75 #define LT7170_VOUT_MODE 0x20
76 #define LT7170_VOUT_COMMAND 0x21
77 #define LT7170_VOUT_MAX 0x24
78 #define LT7170_VOUT_MARGIN_HIGH 0x25
79 #define LT7170_VOUT_MARGIN_LOW 0x26
80 #define LT7170_VOUT_TRANSITION_RATE 0x27
82 #define LT7170_FREQUENCY_SWITCH 0x33
83 #define LT7170_VIN_ON 0x35
84 #define LT7170_VIN_OFF 0x36
86 #define LT7170_IOUT_CAL_OFFSET 0x39
87 #define LT7170_VOUT_OV_FAULT_LIMIT 0x40
88 #define LT7170_VOUT_OV_FAULT_RESPONSE 0x41
89 #define LT7170_VOUT_OV_WARN_LIMIT 0x42
90 #define LT7170_VOUT_UV_WARN_LIMIT 0x43
91 #define LT7170_VOUT_UV_FAULT_LIMIT 0x44
92 #define LT7170_VOUT_UV_FAULT_RESPONSE 0x45
93 #define LT7170_IOUT_OC_FAULT_RESPONSE 0x47
94 #define LT7170_IOUT_OC_WARN_LIMIT 0x4A
96 #define LT7170_OT_FAULT_LIMIT 0x4F
97 #define LT7170_OT_FAULT_RESPONSE 0x50
98 #define LT7170_OT_WARN_LIMIT 0x51
100 #define LT7170_VIN_OV_FAULT_RESPONSE 0x56
101 #define LT7170_VIN_UV_WARN_LIMIT 0x58
103 #define LT7170_TON_DELAY 0x60
104 #define LT7170_TON_RISE 0x61
105 #define LT7170_TON_MAX_FAULT_LIMIT 0x62
106 #define LT7170_TON_MAX_FAULT_RESPONSE 0x63
107 #define LT7170_TOFF_DELAY 0x64
108 #define LT7170_TOFF_FALL 0x65
109 #define LT7170_TOFF_MAX_WARN_LIMIT 0x66
111 #define LT7170_STATUS_BYTE 0x78
112 #define LT7170_STATUS_WORD 0x79
113 #define LT7170_STATUS_VOUT 0x7A
114 #define LT7170_STATUS_IOUT 0x7B
115 #define LT7170_STATUS_INPUT 0x7C
116 #define LT7170_STATUS_TEMPERATURE 0x7D
117 #define LT7170_STATUS_CML 0x7E
118 #define LT7170_STATUS_MFR_SPECIFIC 0x80
120 #define LT7170_READ_VIN 0x88
121 #define LT7170_READ_VOUT 0x8B
122 #define LT7170_READ_IOUT 0x8C
123 #define LT7170_READ_TEMPERATURE_1 0x8D
124 #define LT7170_READ_FREQUENCY 0x95
126 #define LT7170_REVISION 0x98
127 #define LT7170_MFR_ID 0x99
128 #define LT7170_MFR_SERIAL 0x9E
130 #define LT7170_IC_DEVICE_ID 0xAD
131 #define LT7170_IC_DEVICE_REV 0xAE
133 #define LT7170_MFR_NVM_UNLOCK 0xBD
134 #define LT7170_MFR_NVM_USER_WRITES_REMAINING 0xBE
135 #define LT7170_MFR_NVM_DATA 0xBF
136 #define LT7170_MFR_USER_DATA_00 0xC9
137 #define LT7170_MFR_USER_DATA_01 0xCA
138 #define LT7170_MFR_READ_EXTVCC 0xCD
139 #define LT7170_MFR_READ_ITH 0xCE
140 #define LT7170_MFR_CHAN_CONFIG 0xD0
141 #define LT7170_MFR_CONFIG_ALL 0xD1
142 #define LT7170_MFR_FAULT_PROPAGATE 0xD2
143 #define LT7170_MFR_READ_ASEL 0xD3
144 #define LT7170_MFR_PWM_MODE 0xD4
145 #define LT7170_MFR_FAULT_RESPONSE 0xD5
146 #define LT7170_MFR_IOUT_PEAK 0xD7
147 #define LT7170_MFR_ADC_CONTROL 0xD8
148 #define LT7170_MFR_RETRY_DELAY 0xDB
149 #define LT7170_MFR_VOUT_PEAK 0xDD
150 #define LT7170_MFR_VIN_PEAK 0xDE
151 #define LT7170_MFR_TEMPERATURE_1_PEAK 0xDF
152 #define LT7170_MFR_READ_PWM_CFG 0xE0
153 #define LT7170_MFR_READ_VOUT_CFG 0xE1
154 #define LT7170_MFR_CLEAR_PEAKS 0xE3
155 #define LT7170_MFR_DISCHARGE_THRESHOLD 0xE4
156 #define LT7170_MFR_PADS 0xE5
157 #define LT7170_MFR_I2C_ADDRESS 0xE6
158 #define LT7170_MFR_SPECIAL_ID 0xE7
159 #define LT7170_MFR_COMMON 0xEF
160 #define LT7170_MFR_COMPARE_USER_ALL 0xF0
161 #define LT7170_MFR_CHANNEL_STATE 0xF1
162 #define LT7170_MFR_PGOOD_DELAY 0xF2
163 #define LT7170_MFR_NOT_PGOOD_DELAY 0xF3
164 #define LT7170_MFR_PWM_PHASE 0xF5
165 #define LT7170_MFR_SYNC_CONFIG 0xF6
166 #define LT7170_MFR_PIN_CONFIG_STATUS 0xF7
167 #define LT7170_MFR_RAIL_ADDRESS 0xFA
168 #define LT7170_MFR_DISABLE_OUTPUT 0xFB
169 #define LT7170_MFR_NVM_USER_WP 0xFC
170 #define LT7170_MFR_RESET 0xFD
173 #define LT7170_CRC_POLYNOMIAL 0x7
174 #define LT7170_VOUT_MODE_VAL_MSK NO_OS_GENMASK(4,0)
177 #define LT7170_IEEE754_SIGN_BIT NO_OS_BIT(15)
178 #define LT7170_IEEE754_EXPONENT_MSK NO_OS_GENMASK(14, 10)
179 #define LT7170_IEEE754_MANTISSA_MSK NO_OS_GENMASK(9, 0)
180 #define LT7170_IEEE754_MAX_MANTISSA 0x7ff
181 #define LT7170_IEEE754_MIN_MANTISSA 0x400
184 #define LT7170_FREQ_MIN 400000
185 #define LT7170_FREQ_MAX 4000000
186 #define LT7170_VIN_ON_MIN 1400
187 #define LT7170_VIN_ON_MAX 16000
188 #define LT7170_VIN_OFF_MIN 1350
189 #define LT7170_VIN_OFF_MAX 16000
190 #define LT7170_PHASE_FULL_MILLI 360000
193 #define LT7170_STATUS_BYTE_TYPE_MSK 0x01
194 #define LT7170_STATUS_VOUT_TYPE_MSK 0x02
195 #define LT7170_STATUS_IOUT_TYPE_MSK 0x04
196 #define LT7170_STATUS_INPUT_TYPE_MSK 0x08
197 #define LT7170_STATUS_TEMP_TYPE_MSK 0x10
198 #define LT7170_STATUS_CML_TYPE_MSK 0x20
199 #define LT7170_STATUS_MFR_SPECIFIC_TYPE_MSK 0x40
200 #define LT7170_STATUS_WORD_TYPE_MSK 0x80
201 #define LT7170_STATUS_ALL_TYPE_MSK 0xFF
204 #define LT7170_PWM_OP_MODE_BIT NO_OS_BIT(0)
205 #define LT7170_SYNC_CLK_INPUT_BIT NO_OS_BIT(1)
206 #define LT7170_SYNC_CLK_OUTPUT_BIT NO_OS_BIT(0)
207 #define LT7170_ADC_CTRL_LOW_FREQ_BIT NO_OS_BIT(1)
208 #define LT7170_ADC_CTRL_DEBUG_BIT NO_OS_BIT(0)
209 #define LT7170_CONFIG_ALL_PEC_BIT NO_OS_BIT(2)
210 #define LT7170_PADS_RUN_BIT NO_OS_BIT(2)
212 #define LT7170_SPECIAL_ID_VALUE 0x1C1D
353 uint8_t cmd, uint8_t *data);
357 uint8_t cmd, uint8_t value);
361 uint8_t cmd, uint16_t *word);
365 uint8_t cmd, uint16_t word);
369 uint8_t cmd,
int *data);
373 uint8_t cmd,
int data);
377 uint8_t cmd, uint8_t *data,
size_t nbytes);
391 int vout_command,
int vout_max);
398 int margin_high,
int margin_low);
402 int vin_on,
int vin_off);
438 bool debug_telemetry);
@ ID_LT7171_1
Definition: lt7170.h:218
int lt7170_write_word(struct lt7170_dev *dev, uint8_t cmd, uint16_t word)
Perform a raw PMBus write word operation.
Definition: lt7170.c:573
enum lt7170_chip_id chip_id
Definition: lt7170.h:314
bool crc_en
Definition: lt7170.h:318
@ LT7170_STATUS_WORD_TYPE
Definition: lt7170.h:269
#define MILLI
Definition: no_os_units.h:48
@ LT7170_STORE_USER
Definition: lt7170.h:284
Structure holding the parameters for GPIO initialization.
Definition: no_os_gpio.h:79
#define LT7170_IOUT_CAL_OFFSET
Definition: lt7170.h:86
Structure containing the init parameters needed by the PWM generator.
Definition: no_os_pwm.h:66
int lt7170_write_byte(struct lt7170_dev *dev, uint8_t cmd, uint8_t value)
Perform a raw PMBus write byte operation.
Definition: lt7170.c:519
uint8_t byte
Definition: lt7170.h:328
@ LT7170_OPERATION_ON
Definition: lt7170.h:228
@ LT7170_UNLOCK_USER
Definition: lt7170.h:283
int32_t no_os_i2c_write(struct no_os_i2c_desc *desc, uint8_t *data, uint8_t bytes_number, uint8_t stop_bit)
I2C Write data to slave device.
Definition: no_os_i2c.c:159
uint16_t word
Definition: lt7170.h:327
#define dev_err(dev, format,...)
Definition: ad9361_util.h:63
int32_t no_os_i2c_init(struct no_os_i2c_desc **desc, const struct no_os_i2c_init_param *param)
Initialize the I2C communication peripheral.
Definition: no_os_i2c.c:52
#define LT7170_CLEAR_FAULTS
Definition: lt7170.h:60
void no_os_put_unaligned_le16(uint16_t val, uint8_t *buf)
#define LT7170_VOUT_MARGIN_LOW
Definition: lt7170.h:79
#define LT7170_VOUT_UV_WARN_LIMIT
Definition: lt7170.h:90
#define LT7170_IEEE754_MAX_MANTISSA
Definition: lt7170.h:180
@ LT7170_IOUT
Definition: lt7170.h:237
int32_t no_os_pwm_remove(struct no_os_pwm_desc *desc)
Free the resources allocated by no_os_pwm_init().
Definition: no_os_pwm.c:79
int lt7170_vout_value(struct lt7170_dev *dev, int vout_command, int vout_max)
Set output voltage and its upper limit.
Definition: lt7170.c:772
struct no_os_gpio_init_param * fault_param
Definition: lt7170.h:311
int32_t no_os_i2c_remove(struct no_os_i2c_desc *desc)
Free the resources allocated by no_os_i2c_init().
Definition: no_os_i2c.c:113
@ LT7170_RETRY_DELAY
Definition: lt7170.h:278
#define LT7170_ADC_CTRL_DEBUG_BIT
Definition: lt7170.h:208
@ LT7170_TON_MAX_FAULT_LIMIT_TYPE
Definition: lt7170.h:257
#define LT7170_STATUS_INPUT_TYPE_MSK
Definition: lt7170.h:196
#define LT7170_VOUT_MARGIN_HIGH
Definition: lt7170.h:78
int lt7170_vout_margin(struct lt7170_dev *dev, int margin_high, int margin_low)
Set output voltage margin.
Definition: lt7170.c:801
int lt7170_switch_freq(struct lt7170_dev *dev, int freq)
Set switching frequency.
Definition: lt7170.c:866
int lt7170_nvm_cmd(struct lt7170_dev *dev, enum lt7170_nvm_cmd_type cmd)
Perform commands for non-volatile memory (NVM)
Definition: lt7170.c:1011
@ LT7170_IOUT_OC_WARN_LIMIT_TYPE
Definition: lt7170.h:253
@ LT7170_OPERATION_SEQ_OFF
Definition: lt7170.h:231
@ LT7170_VOUT_UV_FAULT_LIMIT_TYPE
Definition: lt7170.h:251
@ LT7170_TEMP_PEAK
Definition: lt7170.h:245
#define LT7170_STATUS_WORD_TYPE_MSK
Definition: lt7170.h:200
int lt7170_set_limit(struct lt7170_dev *dev, enum lt7170_limit_type limit, int limit_val)
Set overvalue and undervalue limits.
Definition: lt7170.c:925
@ LT7170_LOCK_USER
Definition: lt7170.h:282
Header file of Delay functions.
#define LT7170_TON_RISE
Definition: lt7170.h:104
#define LT7170_STORE_USER_ALL
Definition: lt7170.h:68
struct no_os_gpio_desc * fault_desc
Definition: lt7170.h:299
struct no_os_gpio_init_param * pg_param
Definition: lt7170.h:308
int lt7170_write_word_data(struct lt7170_dev *dev, uint8_t cmd, int data)
Converts value to register data and do PMBus write word operation.
Definition: lt7170.c:613
#define LT7170_STATUS_IOUT_TYPE_MSK
Definition: lt7170.h:195
#define LT7170_MFR_DISCHARGE_THRESHOLD
Definition: lt7170.h:155
@ LT7170_TON_DELAY_TYPE
Definition: lt7170.h:274
#define NO_OS_DIV_ROUND_CLOSEST_ULL(x, y)
Definition: no_os_util.h:56
@ LT7170_VOUT_OV_WARN_LIMIT_TYPE
Definition: lt7170.h:250
@ LT7170_TOFF_MAX_WARN_LIMIT_TYPE
Definition: lt7170.h:258
#define LT7170_MFR_PGOOD_DELAY
Definition: lt7170.h:162
@ LT7170_FAULT_PIN_INPUT
Definition: lt7170.h:222
int lt7170_adc_control(struct lt7170_dev *dev, bool low_freq_telemetry, bool debug_telemetry)
Configure ADC control.
Definition: lt7170.c:990
#define LT7170_READ_FREQUENCY
Definition: lt7170.h:124
Definition: ad9361_util.h:69
@ LT7170_VOUT_UV_WARN_LIMIT_TYPE
Definition: lt7170.h:252
@ NO_OS_GPIO_HIGH
Definition: no_os_gpio.h:117
#define LT7170_CRC_POLYNOMIAL
Definition: lt7170.h:173
int lt7170_sync_config(struct lt7170_dev *dev, bool input_clk, bool output_clk)
Configure SYNC pin for clock synchronization.
Definition: lt7170.c:966
int lt7170_set_channel_state(struct lt7170_dev *dev, bool state)
Set channel state using the RUN pin.
Definition: lt7170.c:954
lt7170_timing_type
Definition: lt7170.h:273
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
@ LT7170_PWM_PULSE_SKIP_MODE
Definition: lt7170.h:291
struct no_os_pwm_desc * sync_desc
Definition: lt7170.h:300
int32_t no_os_gpio_direction_input(struct no_os_gpio_desc *desc)
Enable the input direction of the specified GPIO.
Definition: no_os_gpio.c:124
lt7170_value_type
Definition: lt7170.h:234
#define LT7170_VOUT_OV_WARN_LIMIT
Definition: lt7170.h:89
@ LT7170_STATUS_BYTE_TYPE
Definition: lt7170.h:262
int lt7170_vout_margin(struct lt7170_dev *dev, int margin_high, int margin_low)
Set output voltage margin.
Definition: lt7170.c:801
#define LT7170_MFR_NOT_PGOOD_DELAY
Definition: lt7170.h:163
#define LT7170_TOFF_DELAY
Definition: lt7170.h:107
@ LT7170_VOUT
Definition: lt7170.h:236
#define LT7170_SYNC_CLK_INPUT_BIT
Definition: lt7170.h:205
@ LT7170_STATUS_TEMP_TYPE
Definition: lt7170.h:266
int lt7170_sync_config(struct lt7170_dev *dev, bool input_clk, bool output_clk)
Configure SYNC pin for clock synchronization.
Definition: lt7170.c:966
#define LT7170_VIN_OFF
Definition: lt7170.h:84
int lt7170_read_block_data(struct lt7170_dev *dev, uint8_t cmd, uint8_t *data, size_t nbytes)
Perform a PMBus read block operation.
Definition: lt7170.c:633
uint8_t name_size
Definition: lt7170.h:323
#define LT7170_IC_DEVICE_ID
Definition: lt7170.h:130
#define LT7170_OPERATION
Definition: lt7170.h:58
int lt7170_read_value(struct lt7170_dev *dev, enum lt7170_value_type value_type, int *value)
Read a value.
Definition: lt7170.c:680
#define LT7170_VOUT_TRANSITION_RATE
Definition: lt7170.h:80
#define LT7170_VIN_UV_WARN_LIMIT
Definition: lt7170.h:101
#define LT7170_MFR_RESET
Definition: lt7170.h:170
#define LT7170_MFR_COMPARE_USER_ALL
Definition: lt7170.h:160
enum lt7170_chip_id chip_id
Definition: lt7170.h:302
uint8_t temp
Definition: lt7170.h:332
int lt7170_write_byte(struct lt7170_dev *dev, uint8_t cmd, uint8_t value)
Perform a raw PMBus write byte operation.
Definition: lt7170.c:519
#define LT7170_IEEE754_MIN_MANTISSA
Definition: lt7170.h:181
uint8_t slave_address
Definition: no_os_i2c.h:109
#define LT7170_MFR_VOUT_PEAK
Definition: lt7170.h:149
uint32_t no_os_field_prep(uint32_t mask, uint32_t val)
int lt7170_pwm_phase(struct lt7170_dev *dev, int phase)
Set output PWM phase.
Definition: lt7170.c:904
int lt7170_adc_control(struct lt7170_dev *dev, bool low_freq_telemetry, bool debug_telemetry)
Configure ADC control.
Definition: lt7170.c:990
int lt7170_software_reset(struct lt7170_dev *dev)
Perform a device software reset.
Definition: lt7170.c:1050
int lt7170_read_block_data(struct lt7170_dev *dev, uint8_t cmd, uint8_t *data, size_t nbytes)
Perform a PMBus read block operation.
Definition: lt7170.c:633
@ LT7170_TOFF_DELAY_TYPE
Definition: lt7170.h:276
#define LT7170_OT_WARN_LIMIT
Definition: lt7170.h:98
@ LT7170_OPERATION_MARGIN_HIGH
Definition: lt7170.h:229
uint8_t input
Definition: lt7170.h:331
struct no_os_gpio_init_param * run_param
Definition: lt7170.h:309
#define LT7170_STATUS_INPUT
Definition: lt7170.h:115
struct no_os_pwm_init_param * sync_param
Definition: lt7170.h:312
#define LT7170_OT_FAULT_LIMIT
Definition: lt7170.h:96
#define LT7170_STATUS_VOUT_TYPE_MSK
Definition: lt7170.h:194
@ LT7170_TON_RISE_TYPE
Definition: lt7170.h:275
struct no_os_gpio_desc * run_desc
Definition: lt7170.h:297
void no_os_crc8_populate_msb(uint8_t *table, const uint8_t polynomial)
lt7170_pwm_mode
Definition: lt7170.h:289
int lt7170_set_operation(struct lt7170_dev *dev, enum lt7170_operation_type operation)
Set channel operation.
Definition: lt7170.c:942
#define LT7170_STATUS_TEMPERATURE
Definition: lt7170.h:116
int lt7170_clear_faults(struct lt7170_dev *dev)
Clear all asserted faults.
Definition: lt7170.c:1040
@ LT7170_STATUS_ALL_TYPE
Definition: lt7170.h:270
bool crc_en
Definition: lt7170.h:303
#define LT7170_MFR_IOUT_PEAK
Definition: lt7170.h:146
int lt7170_vout_tr(struct lt7170_dev *dev, int tr)
Set output voltage transition rate.
Definition: lt7170.c:789
uint8_t vout
Definition: lt7170.h:329
struct no_os_gpio_init_param * alert_param
Definition: lt7170.h:310
@ LT7170_OT_FAULT_LIMIT_TYPE
Definition: lt7170.h:254
#define LT7170_IEEE754_EXPONENT_MSK
Definition: lt7170.h:178
int lt7170_remove(struct lt7170_dev *dev)
Free or remove device instance.
Definition: lt7170.c:428
@ LT7170_VIN
Definition: lt7170.h:235
#define LT7170_STATUS_IOUT
Definition: lt7170.h:114
#define LT7170_FREQUENCY_SWITCH
Definition: lt7170.h:82
#define LT7170_READ_VOUT
Definition: lt7170.h:121
@ LT7170_FAULT_PIN_OUTPUT
Definition: lt7170.h:223
@ LT7170_COMPARE_USER
Definition: lt7170.h:286
int lt7170_read_status(struct lt7170_dev *dev, enum lt7170_status_type status_type, struct lt7170_status *status)
Read statuses.
Definition: lt7170.c:698
int lt7170_switch_freq(struct lt7170_dev *dev, int freq)
Set switching frequency.
Definition: lt7170.c:866
int lt7170_clear_faults(struct lt7170_dev *dev)
Clear all asserted faults.
Definition: lt7170.c:1040
struct no_os_i2c_desc * i2c_desc
Definition: lt7170.h:295
#define LT7170_MFR_READ_ITH
Definition: lt7170.h:139
#define LT7170_STATUS_BYTE_TYPE_MSK
Definition: lt7170.h:193
int lt7170_software_reset(struct lt7170_dev *dev)
Perform a device software reset.
Definition: lt7170.c:1050
#define LT7170_STATUS_ALL_TYPE_MSK
Definition: lt7170.h:201
#define LT7170_VIN_ON
Definition: lt7170.h:83
lt7170_nvm_cmd_type
Definition: lt7170.h:281
NO_OS_DECLARE_CRC8_TABLE(lt7170_crc_table)
@ LT7170_TOFF_FALL_TYPE
Definition: lt7170.h:277
@ LT7170_STATUS_INPUT_TYPE
Definition: lt7170.h:265
@ LT7170_PWM_FORCED_CONTINUOUS_MODE
Definition: lt7170.h:290
int lt7170_set_vin(struct lt7170_dev *dev, int vin_on, int vin_off)
Set input voltage window at which power conversion will proceed.
Definition: lt7170.c:822
#define LT7170_STATUS_MFR_SPECIFIC
Definition: lt7170.h:118
@ ID_LT7171
Definition: lt7170.h:217
@ LT7170_STATUS_MFR_SPECIFIC_TYPE
Definition: lt7170.h:268
int32_t no_os_gpio_remove(struct no_os_gpio_desc *desc)
Free the resources allocated by no_os_gpio_get().
Definition: no_os_gpio.c:104
#define LT7170_MFR_ADC_CONTROL
Definition: lt7170.h:147
#define no_os_clamp(val, min_val, max_val)
Definition: no_os_util.h:69
uint8_t iout
Definition: lt7170.h:330
#define LT7170_IOUT_OC_WARN_LIMIT
Definition: lt7170.h:94
int lt7170_set_operation(struct lt7170_dev *dev, enum lt7170_operation_type operation)
Set channel operation.
Definition: lt7170.c:942
bool external_clk_en
Definition: lt7170.h:317
#define LT7170_TOFF_MAX_WARN_LIMIT
Definition: lt7170.h:109
int lt7170_set_vin(struct lt7170_dev *dev, int vin_on, int vin_off)
Set input voltage window at which power conversion will proceed.
Definition: lt7170.c:822
#define LT7170_MFR_PWM_PHASE
Definition: lt7170.h:164
int lt7170_vout_tr(struct lt7170_dev *dev, int tr)
Set output voltage transition rate.
Definition: lt7170.c:789
Structure holding the GPIO descriptor.
Definition: no_os_gpio.h:96
int lt7170_read_word(struct lt7170_dev *dev, uint8_t cmd, uint16_t *word)
Perform a raw PMBus read word operation.
Definition: lt7170.c:540
#define LT7170_MFR_NVM_USER_WP
Definition: lt7170.h:169
#define LT7170_RESTORE_USER_ALL
Definition: lt7170.h:69
@ LT7170_VOUT_PEAK
Definition: lt7170.h:243
#define LT7170_STATUS_CML_TYPE_MSK
Definition: lt7170.h:198
int lt7170_read_status(struct lt7170_dev *dev, enum lt7170_status_type status_type, struct lt7170_status *status)
Read statuses.
Definition: lt7170.c:698
#define LT7170_MFR_READ_ASEL
Definition: lt7170.h:143
Structure representing an PWM generator device.
Definition: no_os_pwm.h:93
int lt7170_send_byte(struct lt7170_dev *dev, uint8_t cmd)
Send a PMBus command to the device.
Definition: lt7170.c:469
#define LT7170_FREQ_MAX
Definition: lt7170.h:185
#define LT7170_MFR_TEMPERATURE_1_PEAK
Definition: lt7170.h:151
#define LT7170_VOUT_OV_FAULT_LIMIT
Definition: lt7170.h:87
Structure holding I2C address descriptor.
Definition: no_os_i2c.h:101
int32_t no_os_pwm_init(struct no_os_pwm_desc **desc, const struct no_os_pwm_init_param *param)
Initialize the PWM peripheral.
Definition: no_os_pwm.c:51
#define LT7170_TOFF_FALL
Definition: lt7170.h:108
int32_t no_os_i2c_read(struct no_os_i2c_desc *desc, uint8_t *data, uint8_t bytes_number, uint8_t stop_bit)
I2C Read data from slave device.
Definition: no_os_i2c.c:190
Header file of I2C Interface.
lt7170_limit_type
Definition: lt7170.h:248
int lt7170_send_byte(struct lt7170_dev *dev, uint8_t cmd)
Send a PMBus command to the device.
Definition: lt7170.c:469
lt7170_fault_pin_config
Definition: lt7170.h:221
int lt7170_read_byte(struct lt7170_dev *dev, uint8_t cmd, uint8_t *data)
Perform a raw PMBus read byte operation.
Definition: lt7170.c:488
Header file of PWM Interface.
struct no_os_i2c_init_param * i2c_init
Definition: lt7170.h:307
int lt7170_nvm_cmd(struct lt7170_dev *dev, enum lt7170_nvm_cmd_type cmd)
Perform commands for non-volatile memory (NVM)
Definition: lt7170.c:1011
#define LT7170_IEEE754_MANTISSA_MSK
Definition: lt7170.h:179
int lt7170_read_word_data(struct lt7170_dev *dev, uint8_t cmd, int *data)
Perform a PMBus read word operation and converts to actual value.
Definition: lt7170.c:594
enum lt7170_fault_pin_config fault_cfg
Definition: lt7170.h:315
#define LT7170_STATUS_BYTE
Definition: lt7170.h:111
uint32_t no_os_field_get(uint32_t mask, uint32_t word)
@ LT7170_VIN_PEAK
Definition: lt7170.h:244
int lt7170_pwm_mode(struct lt7170_dev *dev, enum lt7170_pwm_mode pwm_mode)
Set output PWM mode.
Definition: lt7170.c:883
int lt7170_set_limit(struct lt7170_dev *dev, enum lt7170_limit_type limit, int limit_val)
Set overvalue and undervalue limits.
Definition: lt7170.c:925
int lt7170_pwm_phase(struct lt7170_dev *dev, int phase)
Set output PWM phase.
Definition: lt7170.c:904
@ LT7170_OT_WARN_LIMIT_TYPE
Definition: lt7170.h:255
uint8_t no_os_crc8(const uint8_t *table, const uint8_t *pdata, size_t nbytes, uint8_t crc)
struct no_os_gpio_desc * pg_desc
Definition: lt7170.h:296
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 LT7170_STATUS_CML
Definition: lt7170.h:117
uint16_t no_os_get_unaligned_le16(uint8_t *buf)
#define LT7170_VIN_ON_MAX
Definition: lt7170.h:187
#define LT7170_CONFIG_ALL_PEC_BIT
Definition: lt7170.h:209
int lt7170_read_word_data(struct lt7170_dev *dev, uint8_t cmd, int *data)
Perform a PMBus read word operation and converts to actual value.
Definition: lt7170.c:594
@ LT7170_IOUT_PEAK
Definition: lt7170.h:242
#define LT7170_MFR_RETRY_DELAY
Definition: lt7170.h:148
int lt7170_set_timing(struct lt7170_dev *dev, enum lt7170_timing_type timing_type, int time)
Set timing values.
Definition: lt7170.c:853
int lt7170_init(struct lt7170_dev **device, struct lt7170_init_param *init_param)
Initialize the device structure.
Definition: lt7170.c:304
@ LT7170_EXTVCC
Definition: lt7170.h:241
#define LT7170_VIN_OFF_MAX
Definition: lt7170.h:189
Structure holding the parameters for I2C initialization.
Definition: no_os_i2c.h:64
uint8_t mfr_specific
Definition: lt7170.h:334
#define NULL
Definition: wrapper.h:64
#define LT7170_MFR_PWM_MODE
Definition: lt7170.h:144
#define LT7170_PWM_OP_MODE_BIT
Definition: lt7170.h:204
struct ad7616_init_param init_param
Definition: ad7616_sdz.c:113
#define LT7170_SYNC_CLK_OUTPUT_BIT
Definition: lt7170.h:206
int lt7170_set_channel_state(struct lt7170_dev *dev, bool state)
Set channel state using the RUN pin.
Definition: lt7170.c:954
int lt7170_set_timing(struct lt7170_dev *dev, enum lt7170_timing_type timing_type, int time)
Set timing values.
Definition: lt7170.c:853
@ LT7170_STATUS_CML_TYPE
Definition: lt7170.h:267
#define LT7170_VOUT_MAX
Definition: lt7170.h:77
#define LT7170_STATUS_TEMP_TYPE_MSK
Definition: lt7170.h:197
@ LT7170_ITH
Definition: lt7170.h:240
int lt7170_read_byte(struct lt7170_dev *dev, uint8_t cmd, uint8_t *data)
Perform a raw PMBus read byte operation.
Definition: lt7170.c:488
uint8_t cml
Definition: lt7170.h:333
#define LT7170_STATUS_VOUT
Definition: lt7170.h:113
#define LT7170_VOUT_COMMAND
Definition: lt7170.h:76
#define LT7170_PHASE_FULL_MILLI
Definition: lt7170.h:190
#define LT7170_STATUS_WORD
Definition: lt7170.h:112
#define LT7170_STATUS_MFR_SPECIFIC_TYPE_MSK
Definition: lt7170.h:199
@ LT7170_OPERATION_MARGIN_LOW
Definition: lt7170.h:230
int lt7170_vout_value(struct lt7170_dev *dev, int vout_command, int vout_max)
Set output voltage and its upper limit.
Definition: lt7170.c:772
@ LT7170_RESTORE_USER
Definition: lt7170.h:285
@ LT7170_STATUS_VOUT_TYPE
Definition: lt7170.h:263
#define LT7170_TON_DELAY
Definition: lt7170.h:103
@ LT7170_FREQUENCY
Definition: lt7170.h:239
Header file of GPIO Interface.
int lt7170_read_value(struct lt7170_dev *dev, enum lt7170_value_type value_type, int *value)
Read a value.
Definition: lt7170.c:680
#define LT7170_READ_TEMPERATURE_1
Definition: lt7170.h:123
@ ID_LT7170_1
Definition: lt7170.h:216
lt7170_operation_type
Definition: lt7170.h:226
@ LT7170_OPERATION_OFF
Definition: lt7170.h:227
#define LT7170_READ_VIN
Definition: lt7170.h:120
#define LT7170_MFR_SYNC_CONFIG
Definition: lt7170.h:165
#define LT7170_VOUT_UV_FAULT_LIMIT
Definition: lt7170.h:91
@ LT7170_VOUT_OV_FAULT_LIMIT_TYPE
Definition: lt7170.h:249
lt7170_chip_id
Definition: lt7170.h:214
#define LT7170_READ_IOUT
Definition: lt7170.h:122
Header file of utility functions.
int lt7170_write_word_data(struct lt7170_dev *dev, uint8_t cmd, int data)
Converts value to register data and do PMBus write word operation.
Definition: lt7170.c:613
#define LT7170_MFR_READ_PWM_CFG
Definition: lt7170.h:152
@ LT7170_VIN_UV_WARN_LIMIT_TYPE
Definition: lt7170.h:256
#define LT7170_MFR_READ_VOUT_CFG
Definition: lt7170.h:153
int lt7170_read_word(struct lt7170_dev *dev, uint8_t cmd, uint16_t *word)
Perform a raw PMBus read word operation.
Definition: lt7170.c:540
char * name
Definition: lt7170.h:322
int32_t no_os_gpio_direction_output(struct no_os_gpio_desc *desc, uint8_t value)
Enable the output direction of the specified GPIO.
Definition: no_os_gpio.c:147
@ LT7170_STATUS_IOUT_TYPE
Definition: lt7170.h:264
lt7170_status_type
Definition: lt7170.h:261
#define LT7170_MFR_CONFIG_ALL
Definition: lt7170.h:141
#define LT7170_IEEE754_SIGN_BIT
Definition: lt7170.h:177
int lt7170_init(struct lt7170_dev **dev, struct lt7170_init_param *init_param)
Initialize the device structure.
Definition: lt7170.c:304
int lt7170_write_word(struct lt7170_dev *dev, uint8_t cmd, uint16_t word)
Perform a raw PMBus write word operation.
Definition: lt7170.c:573
Header file of CRC-8 computation.
int lt7170_remove(struct lt7170_dev *dev)
Free or remove device instance.
Definition: lt7170.c:428
Error macro definition for ARM Compiler.
#define LT7170_ADC_CTRL_LOW_FREQ_BIT
Definition: lt7170.h:207
#define LT7170_TON_MAX_FAULT_LIMIT
Definition: lt7170.h:105
#define LT7170_MFR_READ_EXTVCC
Definition: lt7170.h:138
#define LT7170_MFR_VIN_PEAK
Definition: lt7170.h:150
@ ID_LT7170
Definition: lt7170.h:215
struct no_os_gpio_desc * alert_desc
Definition: lt7170.h:298
@ LT7170_TEMP
Definition: lt7170.h:238
int32_t no_os_gpio_get_optional(struct no_os_gpio_desc **desc, const struct no_os_gpio_init_param *param)
Get the value of an optional GPIO.
Definition: no_os_gpio.c:75