no-OS
lt7182s.h
Go to the documentation of this file.
1 /*******************************************************************************
2 * @file lt7182s.h
3 * @brief Header file of the LT7182S Driver
4 * @authors Cedric Justine Encarnacion (cedricjustine.encarnacion@analog.com)
5 ********************************************************************************
6 * Copyright 2024(c) Analog Devices, Inc.
7 *
8 * Redistribution and use in source and binary forms, with or without
9 * modification, are permitted provided that the following conditions are met:
10 *
11 * 1. Redistributions of source code must retain the above copyright notice,
12 * this list of conditions and the following disclaimer.
13 *
14 * 2. Redistributions in binary form must reproduce the above copyright notice,
15 * this list of conditions and the following disclaimer in the documentation
16 * and/or other materials provided with the distribution.
17 *
18 * 3. Neither the name of Analog Devices, Inc. nor the names of its
19 * contributors may be used to endorse or promote products derived from this
20 * software without specific prior written permission.
21 *
22 * THIS SOFTWARE IS PROVIDED BY ANALOG DEVICES, INC. “AS IS” AND ANY EXPRESS OR
23 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
24 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
25 * EVENT SHALL ANALOG DEVICES, INC. BE LIABLE FOR ANY DIRECT, INDIRECT,
26 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
27 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
28 * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
29 * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
30 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
31 * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
32 *******************************************************************************/
33 
34 #ifndef __LT7182S_H__
35 #define __LT7182S_H__
36 
37 /******************************************************************************/
38 /***************************** Include Files **********************************/
39 /******************************************************************************/
40 
41 #include <stdint.h>
42 #include <string.h>
43 #include "no_os_util.h"
44 #include "no_os_i2c.h"
45 
46 /******************************************************************************/
47 /********************** Macros and Constants Definitions **********************/
48 /******************************************************************************/
49 
50 /* PMBus commands */
51 #define LT7182S_PAGE 0x00
52 #define LT7182S_OPERATION 0x01
53 #define LT7182S_ON_OFF_CONFIG 0x02
54 #define LT7182S_CLEAR_FAULTS 0x03
55 #define LT7182S_PAGE_PLUS_WRITE 0x05
56 #define LT7182S_PAGE_PLUS_READ 0x06
57 #define LT7182S_ZONE_CONFIG 0x07
58 #define LT7182S_ZONE_ACTIVE 0x08
59 
60 #define LT7182S_WRITE_PROTECT 0x10
61 
62 #define LT7182S_STORE_USER_ALL 0x15
63 #define LT7182S_RESTORE_USER_ALL 0x16
64 
65 #define LT7182S_CAPABILITY 0x19
66 #define LT7182S_QUERY 0x1A
67 #define LT7182S_SMBALERT_MASK 0x1B
68 
69 #define LT7182S_VOUT_MODE 0x20
70 #define LT7182S_VOUT_COMMAND 0x21
71 #define LT7182S_VOUT_MAX 0x24
72 #define LT7182S_VOUT_MARGIN_HIGH 0x25
73 #define LT7182S_VOUT_MARGIN_LOW 0x26
74 #define LT7182S_VOUT_TRANSITION_RATE 0x27
75 
76 #define LT7182S_FREQUENCY_SWITCH 0x33
77 #define LT7182S_VIN_ON 0x35
78 #define LT7182S_VIN_OFF 0x36
79 
80 #define LT7182S_VOUT_OV_FAULT_LIMIT 0x40
81 #define LT7182S_VOUT_OV_FAULT_RESPONSE 0x41
82 #define LT7182S_VOUT_OV_WARN_LIMIT 0x42
83 #define LT7182S_VOUT_UV_WARN_LIMIT 0x43
84 #define LT7182S_VOUT_UV_FAULT_LIMIT 0x44
85 #define LT7182S_VOUT_UV_FAULT_RESPONSE 0x45
86 #define LT7182S_IOUT_OC_FAULT_RESPONSE 0x47
87 #define LT7182S_IOUT_OC_WARN_LIMIT 0x4A
88 
89 #define LT7182S_OT_FAULT_LIMIT 0x4F
90 #define LT7182S_OT_FAULT_RESPONSE 0x50
91 #define LT7182S_OT_WARN_LIMIT 0x51
92 
93 #define LT7182S_VIN_OV_FAULT_RESPONSE 0x56
94 #define LT7182S_VIN_UV_WARN_LIMIT 0x58
95 #define LT7182S_IIN_OC_WARN_LIMIT 0x5D
96 
97 #define LT7182S_TON_DELAY 0x60
98 #define LT7182S_TON_RISE 0x61
99 #define LT7182S_TON_MAX_FAULT_LIMIT 0x62
100 #define LT7182S_TON_MAX_FAULT_RESPONSE 0x63
101 #define LT7182S_TOFF_DELAY 0x64
102 #define LT7182S_TOFF_FALL 0x65
103 #define LT7182S_TOFF_MAX_WARN_LIMIT 0x66
104 
105 #define LT7182S_STATUS_BYTE 0x78
106 #define LT7182S_STATUS_WORD 0x79
107 #define LT7182S_STATUS_VOUT 0x7A
108 #define LT7182S_STATUS_IOUT 0x7B
109 #define LT7182S_STATUS_INPUT 0x7C
110 #define LT7182S_STATUS_TEMPERATURE 0x7D
111 #define LT7182S_STATUS_CML 0x7E
112 #define LT7182S_STATUS_MFR_SPECIFIC 0x80
113 
114 #define LT7182S_READ_VIN 0x88
115 #define LT7182S_READ_IIN 0x89
116 #define LT7182S_READ_VOUT 0x8B
117 #define LT7182S_READ_IOUT 0x8C
118 #define LT7182S_READ_TEMPERATURE_1 0x8D
119 #define LT7182S_READ_FREQUENCY 0x95
120 #define LT7182S_READ_POUT 0x96
121 
122 #define LT7182S_REVISION 0x98
123 #define LT7182S_MFR_ID 0x99
124 #define LT7182S_MFR_MODEL 0x9A
125 #define LT7182S_MFR_REVISION 0x9B
126 #define LT7182S_MFR_SERIAL 0x9E
127 
128 #define LT7182S_IC_DEVICE_ID 0xAD
129 #define LT7182S_IC_DEVICE_REV 0xAE
130 
131 #define LT7182S_MFR_USER_DATA_00 0xC9
132 #define LT7182S_MFR_USER_DATA_01 0xCA
133 #define LT7182S_MFR_USER_DATA_02 0xCB
134 #define LT7182S_MFR_USER_DATA_03 0xCC
135 #define LT7182S_MFR_READ_EXTVCC 0xCD
136 #define LT7182S_MFR_READ_ITH 0xCE
137 #define LT7182S_MFR_CHAN_CONFIG 0xD0
138 #define LT7182S_MFR_CONFIG_ALL 0xD1
139 #define LT7182S_MFR_FAULT_PROPAGATE 0xD2
140 #define LT7182S_MFR_PWM_MODE 0xD4
141 #define LT7182S_MFR_FAULT_RESPONSE 0xD5
142 #define LT7182S_MFR_IOUT_PEAK 0xD7
143 #define LT7182S_MFR_ADC_CONTROL 0xD8
144 #define LT7182S_MFR_RETRY_DELAY 0xDB
145 #define LT7182S_MFR_RESTART_DELAY 0xDC
146 #define LT7182S_MFR_VOUT_PEAK 0xDD
147 #define LT7182S_MFR_VIN_PEAK 0xDE
148 #define LT7182S_MFR_TEMPERATURE_1_PEAK 0xDF
149 #define LT7182S_MFR_CLEAR_PEAKS 0xE3
150 #define LT7182S_MFR_DISCHARGE_THRESHOLD 0xE4
151 #define LT7182S_MFR_PADS 0xE5
152 #define LT7182S_MFR_ADDRESS 0xE6
153 #define LT7182S_MFR_SPECIAL_ID 0xE7
154 #define LT7182S_MFR_FAULT_LOG_TIMESTAMP_MSBS 0xE8
155 #define LT7182S_MFR_FAULT_LOG_TIMESTAMP_LSBS 0xE9
156 #define LT7182S_MFR_FAULT_LOG_STORE 0xEA
157 #define LT7182S_MFR_FAULT_LOG_CLEAR 0xEC
158 #define LT7182S_MFR_FAULT_LOG 0xEE
159 #define LT7182S_MFR_COMMON 0xEF
160 #define LT7182S_MFR_COMPARE_USER_ALL 0xF0
161 #define LT7182S_MFR_CHANNEL_STATE 0xF1
162 #define LT7182S_MFR_PGOOD_DELAY 0xF2
163 #define LT7182S_MFR_NOT_PGOOD_DELAY 0xF3
164 #define LT7182S_MFR_PWM_PHASE 0xF5
165 #define LT7182S_MFR_SYNC_CONFIG 0xF6
166 #define LT7182S_MFR_PIN_CONFIG 0xF7
167 #define LT7182S_MFR_RAIL_ADDRESS 0xFA
168 #define LT7182S_MFR_DISABLE_OUTPUT 0xFB
169 #define LT7182S_MFR_EE_USER_WP 0xFC
170 #define LT7182S_MFR_RESET 0xFD
171 
172 /* PMBus-specific parameters */
173 #define LT7182S_CRC_POLYNOMIAL 0x7
174 #define LT7182S_VOUT_MODE_VAL_MSK NO_OS_GENMASK(4,0)
175 
176 /* LINEAR data format params */
177 #define LT7182S_LIN11_MANTISSA_MAX 1023L
178 #define LT7182S_LIN11_MANTISSA_MIN 511L
179 #define LT7182S_LIN11_EXPONENT_MAX 15
180 #define LT7182S_LIN11_EXPONENT_MIN -15
181 #define LT7182S_LIN11_MANTISSA_MSK NO_OS_GENMASK(10,0)
182 #define LT7182S_LIN11_EXPONENT_MSK NO_OS_GENMASK(15,11)
183 #define LT7182S_LIN11_EXPONENT(x) (int16_t)(x) >> 11
184 #define LT7182S_LIN11_MANTISSA(x) ((int16_t)((x & 0x7FF) << 5)) >> 5
185 #define LT7182S_LIN16_EXPONENT -12
186 
187 /* IEEE754 data format params */
188 #define LT7182S_IEEE754_SIGN_BIT NO_OS_BIT(15)
189 #define LT7182S_IEEE754_EXPONENT_MSK NO_OS_GENMASK(14, 10)
190 #define LT7182S_IEEE754_MANTISSA_MSK NO_OS_GENMASK(9, 0)
191 #define LT7182S_IEEE754_MAX_MANTISSA 0x7ff
192 #define LT7182S_IEEE754_MIN_MANTISSA 0x400
193 
194 /* Device specific constants */
195 #define LT7182S_FREQ_MIN 400000
196 #define LT7182S_FREQ_MAX 4000000
197 #define LT7182S_VIN_ON_MIN 1400
198 #define LT7182S_VIN_ON_MAX 20000
199 #define LT7182S_VIN_OFF_MIN 1350
200 #define LT7182S_VIN_OFF_MAX 20000
201 #define LT7182S_PHASE_FULL_MILLI 360000
202 
203 /* Status types masks */
204 #define LT7182S_STATUS_BYTE_TYPE_MSK 0x01
205 #define LT7182S_STATUS_VOUT_TYPE_MSK 0x02
206 #define LT7182S_STATUS_IOUT_TYPE_MSK 0x04
207 #define LT7182S_STATUS_INPUT_TYPE_MSK 0x08
208 #define LT7182S_STATUS_TEMP_TYPE_MSK 0x10
209 #define LT7182S_STATUS_CML_TYPE_MSK 0x20
210 #define LT7182S_STATUS_MFR_SPECIFIC_TYPE_MSK 0x40
211 #define LT7182S_STATUS_WORD_TYPE_MSK 0x80
212 #define LT7182S_STATUS_ALL_TYPE_MSK 0xFF
213 
214 /* LT7182s configurable bits and masks */
215 #define LT7182S_PWM_OP_MODE_BIT NO_OS_BIT(0)
216 #define LT7182S_SYNC_CLK_INPUT_BIT NO_OS_BIT(1)
217 #define LT7182S_SYNC_CLK_OUTPUT_BIT NO_OS_BIT(0)
218 #define LT7182S_ADC_CTRL_LOW_FREQ_BIT NO_OS_BIT(1)
219 #define LT7182S_ADC_CTRL_DEBUG_BIT NO_OS_BIT(0)
220 #define LT7182S_CONFIG_ALL_FORMAT_BIT NO_OS_BIT(8)
221 #define LT7182S_CONFIG_ALL_PEC_BIT NO_OS_BIT(2)
222 #define LT7182S_PADS_RUN0_BIT NO_OS_BIT(4)
223 #define LT7182S_PADS_RUN1_BIT NO_OS_BIT(5)
224 
225 #define LT7182S_SPECIAL_ID_VALUE 0x1C1D
226 
230 };
231 
236 };
237 
241 };
242 
246 };
247 
254 };
255 
270 };
271 
284 };
285 
296 };
297 
305 };
306 
313 };
314 
318 };
319 
320 struct lt7182s_dev {
330 
333  int page;
335  bool crc_en;
336 };
337 
348 
353 
355  bool crc_en;
356 };
357 
359  char *name;
360 };
361 
363  uint16_t word;
364  uint8_t byte;
365  uint8_t vout;
366  uint8_t iout;
367  uint8_t input;
368  uint8_t temp;
369  uint8_t cml;
370  uint8_t mfr_specific;
371 };
372 
373 /******************************************************************************/
374 /************************ Functions Declarations ******************************/
375 /******************************************************************************/
376 
377 /* Initialize the device structure */
378 int lt7182s_init(struct lt7182s_dev **dev,
380 
381 /* Free or remove device instance */
382 int lt7182s_remove(struct lt7182s_dev *dev);
383 
384 /* Set PMBus page and phase */
385 int lt7182s_set_page(struct lt7182s_dev *dev, int page);
386 
387 /* Send a PMBus command to the device */
388 int lt7182s_send_byte(struct lt7182s_dev *dev, int page, uint8_t cmd);
389 
390 /* Perform a PMBus read_byte operation */
391 int lt7182s_read_byte(struct lt7182s_dev *dev, int page,
392  uint8_t cmd, uint8_t *data);
393 
394 /* Perform a PMBus write_byte operation */
395 int lt7182s_write_byte(struct lt7182s_dev *dev, int page,
396  uint8_t cmd, uint8_t value);
397 
398 /* Perform a PMBus read_word operation */
399 int lt7182s_read_word(struct lt7182s_dev *dev, int page,
400  uint8_t cmd, uint16_t *word);
401 
402 /* Perform a PMBus write_word operation */
403 int lt7182s_write_word(struct lt7182s_dev *dev, int page,
404  uint8_t cmd, uint16_t word);
405 
406 /* Perform a PMBus read_word operation then perform conversion*/
407 int lt7182s_read_word_data(struct lt7182s_dev *dev, int page,
408  uint8_t cmd, int *data);
409 
410 /* Perform conversion then perform a PMBus write_word operation */
411 int lt7182s_write_word_data(struct lt7182s_dev *dev, int page,
412  uint8_t cmd, int data);
413 
414 /* Read a block of bytes */
415 int lt7182s_read_block_data(struct lt7182s_dev *dev, int page,
416  uint8_t cmd, uint8_t *data, size_t nbytes);
417 
418 /* Read specific value type */
419 int lt7182s_read_value(struct lt7182s_dev *dev, int channel,
420  enum lt7182s_value_type value_type,
421  int *value);
422 
423 /* Read status */
424 int lt7182s_read_status(struct lt7182s_dev *dev, int channel,
425  enum lt7182s_status_type status_type,
426  struct lt7182s_status *status);
427 
428 /* Set VOUT parameters: VOUT_COMMAND and VOUT_MAX */
429 int lt7182s_vout_value(struct lt7182s_dev *dev, int channel,
430  int vout_command, int vout_max);
431 
432 /* Set VOUT transition rate */
433 int lt7182s_vout_tr(struct lt7182s_dev *dev, int channel, int tr);
434 
435 /* Set VOUT margins */
436 int lt7182s_vout_margin(struct lt7182s_dev *dev, int channel,
437  int margin_high, int margin_low);
438 
439 /* Set VIN threshold when to start power conversion */
440 int lt7182s_set_vin(struct lt7182s_dev *dev, int channel,
441  int vin_on, int vin_off);
442 
443 /* Set timing values */
444 int lt7182s_set_timing(struct lt7182s_dev *dev, int channel,
445  enum lt7182s_timing_type timing_type, int time);
446 
447 /* Set switching frequency */
448 int lt7182s_switch_freq(struct lt7182s_dev *dev, int freq);
449 
450 /* Set PWM mode of a channel */
451 int lt7182s_pwm_mode(struct lt7182s_dev *dev, int channel,
452  enum lt7182s_pwm_mode pwm_mode);
453 
454 /* Set PWM phase offset of a channel */
455 int lt7182s_pwm_phase(struct lt7182s_dev *dev, int channel,
456  int phase);
457 
458 /* Set fault/warning limit values */
459 int lt7182s_set_limit(struct lt7182s_dev *dev, int channel,
460  enum lt7182s_limit_type limit, int limit_val);
461 
462 /* Set operation */
463 int lt7182s_set_operation(struct lt7182s_dev *dev, int channel,
464  enum lt7182s_operation_type operation);
465 
466 /* Set channel state */
467 int lt7182s_set_channel_state(struct lt7182s_dev *dev, int channel,
468  bool state);
469 
470 /* Set clock synchronization configs */
471 int lt7182s_sync_config(struct lt7182s_dev *dev,
472  bool input_clk,
473  bool output_clk);
474 
475 /* Set ADC telemetry control */
476 int lt7182s_adc_control(struct lt7182s_dev *dev, bool low_freq_telemetry,
477  bool debug_telemetry);
478 
479 /* NVM/EEPROM user commands */
480 int lt7182s_nvm_cmd(struct lt7182s_dev *dev, enum lt7182s_nvm_cmd_type cmd);
481 
482 /* Clear status faults */
483 int lt7182s_clear_faults(struct lt7182s_dev *dev);
484 
485 /* Software reset */
486 int lt7182s_software_reset(struct lt7182s_dev *dev);
487 
488 #endif /* __LT7182S_H__ */
LT7182S_POUT
@ LT7182S_POUT
Definition: lt7182s.h:263
lt7182s_set_operation
int lt7182s_set_operation(struct lt7182s_dev *dev, int channel, enum lt7182s_operation_type operation)
Set channel operation.
Definition: lt7182s.c:1425
lt7182s_nvm_cmd_type
lt7182s_nvm_cmd_type
Definition: lt7182s.h:307
LT7182S_STATUS_ALL_TYPE
@ LT7182S_STATUS_ALL_TYPE
Definition: lt7182s.h:295
LT7182S_PAGE
#define LT7182S_PAGE
Definition: lt7182s.h:51
LT7182S_READ_IOUT
#define LT7182S_READ_IOUT
Definition: lt7182s.h:117
lt7182s_pwm_phase
int lt7182s_pwm_phase(struct lt7182s_dev *dev, int channel, int phase)
Set output PWM phase.
Definition: lt7182s.c:1381
LT7182S_VOUT_OV_WARN_LIMIT_TYPE
@ LT7182S_VOUT_OV_WARN_LIMIT_TYPE
Definition: lt7182s.h:274
MILLI
#define MILLI
Definition: no_os_units.h:48
lt7182s_software_reset
int lt7182s_software_reset(struct lt7182s_dev *dev)
Perform a device software reset.
Definition: lt7182s.c:1559
LT7182S_EXTVCC
@ LT7182S_EXTVCC
Definition: lt7182s.h:265
lt7182s_chip_info
Definition: lt7182s.h:358
no_os_alloc.h
no_os_gpio_init_param
Structure holding the parameters for GPIO initialization.
Definition: no_os_gpio.h:79
LT7182S_MFR_CONFIG_ALL
#define LT7182S_MFR_CONFIG_ALL
Definition: lt7182s.h:138
no_os_pwm_init_param
Structure containing the init parameters needed by the PWM generator.
Definition: no_os_pwm.h:66
LT7182S_VIN_ON_MAX
#define LT7182S_VIN_ON_MAX
Definition: lt7182s.h:198
LT7182S_ITH
@ LT7182S_ITH
Definition: lt7182s.h:264
lt7182s_init_param::alert_param
struct no_os_gpio_init_param * alert_param
Definition: lt7182s.h:344
lt7182s_status::vout
uint8_t vout
Definition: lt7182s.h:365
LT7182S_COMPARE_USER
@ LT7182S_COMPARE_USER
Definition: lt7182s.h:312
LT7182S_MFR_SPECIAL_ID
#define LT7182S_MFR_SPECIAL_ID
Definition: lt7182s.h:153
lt7182s_dev::run0_desc
struct no_os_gpio_desc * run0_desc
Definition: lt7182s.h:324
lt7182s_set_operation
int lt7182s_set_operation(struct lt7182s_dev *dev, int channel, enum lt7182s_operation_type operation)
Set channel operation.
Definition: lt7182s.c:1425
LT7182S_IIN_OC_WARN_LIMIT
#define LT7182S_IIN_OC_WARN_LIMIT
Definition: lt7182s.h:95
LT7182S_STATUS_WORD
#define LT7182S_STATUS_WORD
Definition: lt7182s.h:106
no_os_i2c_write
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
lt7182s_init_param::fault0_param
struct no_os_gpio_init_param * fault0_param
Definition: lt7182s.h:345
LT7182S_VIN_OFF
#define LT7182S_VIN_OFF
Definition: lt7182s.h:78
dev_err
#define dev_err(dev, format,...)
Definition: ad9361_util.h:63
no_os_i2c_init
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
LT7182S_READ_POUT
#define LT7182S_READ_POUT
Definition: lt7182s.h:120
no_os_put_unaligned_le16
void no_os_put_unaligned_le16(uint16_t val, uint8_t *buf)
LT7182S_STATUS_TEMPERATURE
#define LT7182S_STATUS_TEMPERATURE
Definition: lt7182s.h:110
NO_OS_DECLARE_CRC8_TABLE
NO_OS_DECLARE_CRC8_TABLE(lt7182s_crc_table)
lt7182s_init_param::fault1_param
struct no_os_gpio_init_param * fault1_param
Definition: lt7182s.h:346
lt7182s_sync_config
int lt7182s_sync_config(struct lt7182s_dev *dev, bool input_clk, bool output_clk)
Configure SYNC pin for clock synchronization.
Definition: lt7182s.c:1461
LT7182S_RESTORE_USER_ALL
#define LT7182S_RESTORE_USER_ALL
Definition: lt7182s.h:63
LT7182S_SYNC_CLK_INPUT_BIT
#define LT7182S_SYNC_CLK_INPUT_BIT
Definition: lt7182s.h:216
lt7182s_clear_faults
int lt7182s_clear_faults(struct lt7182s_dev *dev)
Clear all asserted faults.
Definition: lt7182s.c:1548
lt7182s_set_limit
int lt7182s_set_limit(struct lt7182s_dev *dev, int channel, enum lt7182s_limit_type limit, int limit_val)
Set overvalue and undervalue limits.
Definition: lt7182s.c:1406
LT7182S_IOUT_OC_WARN_LIMIT_TYPE
@ LT7182S_IOUT_OC_WARN_LIMIT_TYPE
Definition: lt7182s.h:278
LT7182S_PHASE_FULL_MILLI
#define LT7182S_PHASE_FULL_MILLI
Definition: lt7182s.h:201
MICROWATT_PER_WATT
#define MICROWATT_PER_WATT
Definition: no_os_units.h:69
LT7182S_STATUS_BYTE_TYPE_MSK
#define LT7182S_STATUS_BYTE_TYPE_MSK
Definition: lt7182s.h:204
LT7182S_IIN
@ LT7182S_IIN
Definition: lt7182s.h:258
LT7182S_LIN11_EXPONENT_MIN
#define LT7182S_LIN11_EXPONENT_MIN
Definition: lt7182s.h:180
lt7182s_timing_type
lt7182s_timing_type
Definition: lt7182s.h:298
lt7182s_dev::alert_desc
struct no_os_gpio_desc * alert_desc
Definition: lt7182s.h:326
no_os_pwm_remove
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
LT7182S_MFR_ADC_CONTROL
#define LT7182S_MFR_ADC_CONTROL
Definition: lt7182s.h:143
LT7182S_CHAN_ALL
@ LT7182S_CHAN_ALL
Definition: lt7182s.h:235
LT7182S_IOUT
@ LT7182S_IOUT
Definition: lt7182s.h:260
LT7182S_TON_RISE
#define LT7182S_TON_RISE
Definition: lt7182s.h:98
no_os_i2c_remove
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
lt7182s_set_limit
int lt7182s_set_limit(struct lt7182s_dev *dev, int channel, enum lt7182s_limit_type limit, int limit_val)
Set overvalue and undervalue limits.
Definition: lt7182s.c:1406
LT7182S_VOUT_UV_FAULT_LIMIT_TYPE
@ LT7182S_VOUT_UV_FAULT_LIMIT_TYPE
Definition: lt7182s.h:275
LT7182S_ADC_CTRL_DEBUG_BIT
#define LT7182S_ADC_CTRL_DEBUG_BIT
Definition: lt7182s.h:219
no_os_units.h
Header file of Units.
lt7182s_status::iout
uint8_t iout
Definition: lt7182s.h:366
LT7182S_MFR_CHANNEL_STATE
#define LT7182S_MFR_CHANNEL_STATE
Definition: lt7182s.h:161
LT7182S_READ_FREQUENCY
#define LT7182S_READ_FREQUENCY
Definition: lt7182s.h:119
LT7182S_STATUS_VOUT
#define LT7182S_STATUS_VOUT
Definition: lt7182s.h:107
lt7182s_read_block_data
int lt7182s_read_block_data(struct lt7182s_dev *dev, int page, uint8_t cmd, uint8_t *data, size_t nbytes)
Perform a PMBus read block operation.
Definition: lt7182s.c:1051
lt7182s_chip_id
lt7182s_chip_id
Definition: lt7182s.h:227
LT7182S_VIN_UV_WARN_LIMIT
#define LT7182S_VIN_UV_WARN_LIMIT
Definition: lt7182s.h:94
lt7182s_init_param::crc_en
bool crc_en
Definition: lt7182s.h:355
LT7182S_MFR_FAULT_RESPONSE
#define LT7182S_MFR_FAULT_RESPONSE
Definition: lt7182s.h:141
no_os_delay.h
Header file of Delay functions.
LT7182S_VOUT_MARGIN_HIGH
#define LT7182S_VOUT_MARGIN_HIGH
Definition: lt7182s.h:72
lt7182s_status::input
uint8_t input
Definition: lt7182s.h:367
LT7182S_FAULT_PIN_INPUT
@ LT7182S_FAULT_PIN_INPUT
Definition: lt7182s.h:239
LT7182S_IEEE754_EXPONENT_MSK
#define LT7182S_IEEE754_EXPONENT_MSK
Definition: lt7182s.h:189
LT7182S_PWM_OP_MODE_BIT
#define LT7182S_PWM_OP_MODE_BIT
Definition: lt7182s.h:215
lt7182s_dev::lin16_exp
int lin16_exp
Definition: lt7182s.h:334
lt7182s_init
int lt7182s_init(struct lt7182s_dev **device, struct lt7182s_init_param *init_param)
Initialize the device structure.
Definition: lt7182s.c:526
lt7182s_write_byte
int lt7182s_write_byte(struct lt7182s_dev *dev, int page, uint8_t cmd, uint8_t value)
Perform a raw PMBus write byte operation.
Definition: lt7182s.c:904
LT7182S_OT_WARN_LIMIT_TYPE
@ LT7182S_OT_WARN_LIMIT_TYPE
Definition: lt7182s.h:280
LT7182S_STATUS_CML_TYPE_MSK
#define LT7182S_STATUS_CML_TYPE_MSK
Definition: lt7182s.h:209
lt7182s_value_type
lt7182s_value_type
Definition: lt7182s.h:256
LT7182S_MFR_RAIL_ADDRESS
#define LT7182S_MFR_RAIL_ADDRESS
Definition: lt7182s.h:167
lt7182s_dev::sync_desc
struct no_os_pwm_desc * sync_desc
Definition: lt7182s.h:329
NO_OS_DIV_ROUND_CLOSEST_ULL
#define NO_OS_DIV_ROUND_CLOSEST_ULL(x, y)
Definition: no_os_util.h:56
LT7182S_VOUT_TRANSITION_RATE
#define LT7182S_VOUT_TRANSITION_RATE
Definition: lt7182s.h:74
lt7182s_write_word
int lt7182s_write_word(struct lt7182s_dev *dev, int page, uint8_t cmd, uint16_t word)
Perform a raw PMBus write word operation.
Definition: lt7182s.c:976
LT7182S_IIN_OC_WARN_LIMIT_TYPE
@ LT7182S_IIN_OC_WARN_LIMIT_TYPE
Definition: lt7182s.h:277
LT7182S_TOFF_FALL
#define LT7182S_TOFF_FALL
Definition: lt7182s.h:102
LT7182S_MFR_COMPARE_USER_ALL
#define LT7182S_MFR_COMPARE_USER_ALL
Definition: lt7182s.h:160
LT7182S_MFR_RETRY_DELAY
#define LT7182S_MFR_RETRY_DELAY
Definition: lt7182s.h:144
lt7182s_dev
Definition: lt7182s.h:320
LT7182S_STATUS_IOUT
#define LT7182S_STATUS_IOUT
Definition: lt7182s.h:108
device
Definition: ad9361_util.h:69
LT7182S_TOFF_DELAY
#define LT7182S_TOFF_DELAY
Definition: lt7182s.h:101
LT7182S_VOUT
@ LT7182S_VOUT
Definition: lt7182s.h:259
lt7182s_pwm_phase
int lt7182s_pwm_phase(struct lt7182s_dev *dev, int channel, int phase)
Set output PWM phase.
Definition: lt7182s.c:1381
NO_OS_GPIO_HIGH
@ NO_OS_GPIO_HIGH
Definition: no_os_gpio.h:117
LT7182S_STATUS_INPUT_TYPE
@ LT7182S_STATUS_INPUT_TYPE
Definition: lt7182s.h:290
lt7182s_nvm_cmd
int lt7182s_nvm_cmd(struct lt7182s_dev *dev, enum lt7182s_nvm_cmd_type cmd)
Perform commands for non-volatile memory/EEPROM.
Definition: lt7182s.c:1512
LT7182S_LIN11_MANTISSA_MAX
#define LT7182S_LIN11_MANTISSA_MAX
Definition: lt7182s.h:177
lt7182s_switch_freq
int lt7182s_switch_freq(struct lt7182s_dev *dev, int freq)
Set switching frequency.
Definition: lt7182s.c:1320
lt7182s_set_vin
int lt7182s_set_vin(struct lt7182s_dev *dev, int channel, int vin_on, int vin_off)
Set input voltage window at which power conversion will proceed.
Definition: lt7182s.c:1269
LT7182S_OT_FAULT_LIMIT_TYPE
@ LT7182S_OT_FAULT_LIMIT_TYPE
Definition: lt7182s.h:279
lt7182s_init_param::run1_param
struct no_os_gpio_init_param * run1_param
Definition: lt7182s.h:343
LT7182S_LIN11_EXPONENT_MSK
#define LT7182S_LIN11_EXPONENT_MSK
Definition: lt7182s.h:182
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
LT7182S_OPERATION_ON
@ LT7182S_OPERATION_ON
Definition: lt7182s.h:250
LT7182S_VOUT_COMMAND
#define LT7182S_VOUT_COMMAND
Definition: lt7182s.h:70
no_os_gpio_direction_input
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
lt7182s_status::mfr_specific
uint8_t mfr_specific
Definition: lt7182s.h:370
LT7182S_MFR_READ_ITH
#define LT7182S_MFR_READ_ITH
Definition: lt7182s.h:136
lt7182s_read_block_data
int lt7182s_read_block_data(struct lt7182s_dev *dev, int page, uint8_t cmd, uint8_t *data, size_t nbytes)
Perform a PMBus read block operation.
Definition: lt7182s.c:1051
lt7182s_set_vin
int lt7182s_set_vin(struct lt7182s_dev *dev, int channel, int vin_on, int vin_off)
Set input voltage window at which power conversion will proceed.
Definition: lt7182s.c:1269
LT7182S_PWM_PULSE_SKIP_MODE
@ LT7182S_PWM_PULSE_SKIP_MODE
Definition: lt7182s.h:317
LT7182S_MFR_TEMPERATURE_1_PEAK
#define LT7182S_MFR_TEMPERATURE_1_PEAK
Definition: lt7182s.h:148
LT7182S_VIN_UV_WARN_LIMIT_TYPE
@ LT7182S_VIN_UV_WARN_LIMIT_TYPE
Definition: lt7182s.h:281
lt7182s_write_byte
int lt7182s_write_byte(struct lt7182s_dev *dev, int page, uint8_t cmd, uint8_t value)
Perform a raw PMBus write byte operation.
Definition: lt7182s.c:904
lt7182s_set_page
int lt7182s_set_page(struct lt7182s_dev *dev, int page)
Set page of the device. Page 0x0 - Channel 0 Page 0x1 - Channel 1 Page 0xff - Both channels.
Definition: lt7182s.c:776
lt7182s_init_param::pg0_param
struct no_os_gpio_init_param * pg0_param
Definition: lt7182s.h:340
lt7182s_dev::page
int page
Definition: lt7182s.h:333
lt7182s.h
lt7182s_dev::pg0_desc
struct no_os_gpio_desc * pg0_desc
Definition: lt7182s.h:322
LT7182S_MFR_PWM_MODE
#define LT7182S_MFR_PWM_MODE
Definition: lt7182s.h:140
lt7182s_write_word
int lt7182s_write_word(struct lt7182s_dev *dev, int page, uint8_t cmd, uint16_t word)
Perform a raw PMBus write word operation.
Definition: lt7182s.c:976
LT7182S_FREQUENCY
@ LT7182S_FREQUENCY
Definition: lt7182s.h:262
lt7182s_dev::chip_id
enum lt7182s_chip_id chip_id
Definition: lt7182s.h:331
LT7182S_TON_MAX_FAULT_RESPONSE
#define LT7182S_TON_MAX_FAULT_RESPONSE
Definition: lt7182s.h:100
no_os_i2c_desc::slave_address
uint8_t slave_address
Definition: no_os_i2c.h:109
no_os_field_prep
uint32_t no_os_field_prep(uint32_t mask, uint32_t val)
LT7182S_TON_MAX_FAULT_LIMIT_TYPE
@ LT7182S_TON_MAX_FAULT_LIMIT_TYPE
Definition: lt7182s.h:282
LT7182S_TON_DELAY
#define LT7182S_TON_DELAY
Definition: lt7182s.h:97
LT7182S_VIN_OFF_MAX
#define LT7182S_VIN_OFF_MAX
Definition: lt7182s.h:200
LT7182S_TON_DELAY_TYPE
@ LT7182S_TON_DELAY_TYPE
Definition: lt7182s.h:299
lt7182s_nvm_cmd
int lt7182s_nvm_cmd(struct lt7182s_dev *dev, enum lt7182s_nvm_cmd_type cmd)
Perform commands for non-volatile memory/EEPROM.
Definition: lt7182s.c:1512
LT7182S_TON_RISE_TYPE
@ LT7182S_TON_RISE_TYPE
Definition: lt7182s.h:300
LT7182S_CRC_POLYNOMIAL
#define LT7182S_CRC_POLYNOMIAL
Definition: lt7182s.h:173
lt7182s_dev::crc_en
bool crc_en
Definition: lt7182s.h:335
LT7182S_TOFF_MAX_WARN_LIMIT
#define LT7182S_TOFF_MAX_WARN_LIMIT
Definition: lt7182s.h:103
lt7182s_switch_freq
int lt7182s_switch_freq(struct lt7182s_dev *dev, int freq)
Set switching frequency.
Definition: lt7182s.c:1320
LT7182S_MFR_SYNC_CONFIG
#define LT7182S_MFR_SYNC_CONFIG
Definition: lt7182s.h:165
LT7182S_OPERATION
#define LT7182S_OPERATION
Definition: lt7182s.h:52
lt7182s_pwm_mode
int lt7182s_pwm_mode(struct lt7182s_dev *dev, int channel, enum lt7182s_pwm_mode pwm_mode)
Set output PWM mode.
Definition: lt7182s.c:1337
LT7182S_SMBALERT_MASK
#define LT7182S_SMBALERT_MASK
Definition: lt7182s.h:67
LT7182S_STATUS_IOUT_TYPE_MSK
#define LT7182S_STATUS_IOUT_TYPE_MSK
Definition: lt7182s.h:206
LT7182S_FAULT_PIN_OUTPUT
@ LT7182S_FAULT_PIN_OUTPUT
Definition: lt7182s.h:240
lt7182s_remove
int lt7182s_remove(struct lt7182s_dev *dev)
Free or remove device instance.
Definition: lt7182s.c:719
LT7182S_STATUS_INPUT_TYPE_MSK
#define LT7182S_STATUS_INPUT_TYPE_MSK
Definition: lt7182s.h:207
lt7182s_chip_info::name
char * name
Definition: lt7182s.h:359
no_os_crc8_populate_msb
void no_os_crc8_populate_msb(uint8_t *table, const uint8_t polynomial)
LT7182S_STATUS_MFR_SPECIFIC_TYPE
@ LT7182S_STATUS_MFR_SPECIFIC_TYPE
Definition: lt7182s.h:293
MILLIVOLT_PER_VOLT
#define MILLIVOLT_PER_VOLT
Definition: no_os_units.h:58
LT7182S_OPERATION_MARGIN_HIGH
@ LT7182S_OPERATION_MARGIN_HIGH
Definition: lt7182s.h:251
lt7182s_read_status
int lt7182s_read_status(struct lt7182s_dev *dev, int channel, enum lt7182s_status_type status_type, struct lt7182s_status *status)
Read statuses.
Definition: lt7182s.c:1130
LT7182S_SPECIAL_ID_VALUE
#define LT7182S_SPECIAL_ID_VALUE
Definition: lt7182s.h:225
LT7182S_ON_OFF_CONFIG
#define LT7182S_ON_OFF_CONFIG
Definition: lt7182s.h:53
LT7182S_STATUS_VOUT_TYPE_MSK
#define LT7182S_STATUS_VOUT_TYPE_MSK
Definition: lt7182s.h:205
LT7182S_UNLOCK_USER
@ LT7182S_UNLOCK_USER
Definition: lt7182s.h:309
LT7182S_STATUS_CML
#define LT7182S_STATUS_CML
Definition: lt7182s.h:111
LT7182S_OPERATION_MARGIN_LOW
@ LT7182S_OPERATION_MARGIN_LOW
Definition: lt7182s.h:252
lt7182s_adc_control
int lt7182s_adc_control(struct lt7182s_dev *dev, bool low_freq_telemetry, bool debug_telemetry)
Configure ADC control.
Definition: lt7182s.c:1489
LT7182S_IOUT_OC_FAULT_RESPONSE
#define LT7182S_IOUT_OC_FAULT_RESPONSE
Definition: lt7182s.h:86
LT7182S_VOUT_UV_WARN_LIMIT
#define LT7182S_VOUT_UV_WARN_LIMIT
Definition: lt7182s.h:83
ID_LT7184S
@ ID_LT7184S
Definition: lt7182s.h:229
lt7182s_dev::i2c_desc
struct no_os_i2c_desc * i2c_desc
Definition: lt7182s.h:321
LT7182S_IOUT_OC_WARN_LIMIT
#define LT7182S_IOUT_OC_WARN_LIMIT
Definition: lt7182s.h:87
lt7182s_set_page
int lt7182s_set_page(struct lt7182s_dev *dev, int page)
Set page of the device. Page 0x0 - Channel 0 Page 0x1 - Channel 1 Page 0xff - Both channels.
Definition: lt7182s.c:776
lt7182s_status::word
uint16_t word
Definition: lt7182s.h:363
LT7182S_VIN_OV_FAULT_RESPONSE
#define LT7182S_VIN_OV_FAULT_RESPONSE
Definition: lt7182s.h:93
lt7182s_read_byte
int lt7182s_read_byte(struct lt7182s_dev *dev, int page, uint8_t cmd, uint8_t *data)
Perform a raw PMBus read byte operation.
Definition: lt7182s.c:865
LT7182S_VOUT_UV_FAULT_LIMIT
#define LT7182S_VOUT_UV_FAULT_LIMIT
Definition: lt7182s.h:84
LT7182S_LIN11_MANTISSA
#define LT7182S_LIN11_MANTISSA(x)
Definition: lt7182s.h:184
lt7182s_read_word
int lt7182s_read_word(struct lt7182s_dev *dev, int page, uint8_t cmd, uint16_t *word)
Perform a raw PMBus read word operation.
Definition: lt7182s.c:934
LT7182S_VOUT_UV_WARN_LIMIT_TYPE
@ LT7182S_VOUT_UV_WARN_LIMIT_TYPE
Definition: lt7182s.h:276
lt7182s_vout_value
int lt7182s_vout_value(struct lt7182s_dev *dev, int channel, int vout_command, int vout_max)
Set output voltage and its upper limit.
Definition: lt7182s.c:1206
LT7182S_VOUT_OV_WARN_LIMIT
#define LT7182S_VOUT_OV_WARN_LIMIT
Definition: lt7182s.h:82
lt7182s_status::cml
uint8_t cml
Definition: lt7182s.h:369
LT7182S_LIN11_MANTISSA_MIN
#define LT7182S_LIN11_MANTISSA_MIN
Definition: lt7182s.h:178
LT7182S_TOFF_MAX_WARN_LIMIT_TYPE
@ LT7182S_TOFF_MAX_WARN_LIMIT_TYPE
Definition: lt7182s.h:283
LT7182S_OPERATION_OFF
@ LT7182S_OPERATION_OFF
Definition: lt7182s.h:249
no_os_gpio_remove
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
lt7182s_remove
int lt7182s_remove(struct lt7182s_dev *dev)
Free or remove device instance.
Definition: lt7182s.c:719
LT7182S_IOUT_PEAK
@ LT7182S_IOUT_PEAK
Definition: lt7182s.h:266
LT7182S_FREQ_MAX
#define LT7182S_FREQ_MAX
Definition: lt7182s.h:196
LT7182S_STATUS_TEMP_TYPE
@ LT7182S_STATUS_TEMP_TYPE
Definition: lt7182s.h:291
LT7182S_STATUS_TEMP_TYPE_MSK
#define LT7182S_STATUS_TEMP_TYPE_MSK
Definition: lt7182s.h:208
no_os_clamp
#define no_os_clamp(val, min_val, max_val)
Definition: no_os_util.h:69
LT7182S_STATUS_CML_TYPE
@ LT7182S_STATUS_CML_TYPE
Definition: lt7182s.h:292
lt7182s_read_word
int lt7182s_read_word(struct lt7182s_dev *dev, int page, uint8_t cmd, uint16_t *word)
Perform a raw PMBus read word operation.
Definition: lt7182s.c:934
LT7182S_LIN11_EXPONENT_MAX
#define LT7182S_LIN11_EXPONENT_MAX
Definition: lt7182s.h:179
LT7182S_TEMP_PEAK
@ LT7182S_TEMP_PEAK
Definition: lt7182s.h:269
LT7182S_LIN16_EXPONENT
#define LT7182S_LIN16_EXPONENT
Definition: lt7182s.h:185
lt7182s_pwm_mode
lt7182s_pwm_mode
Definition: lt7182s.h:315
LT7182S_STATUS_IOUT_TYPE
@ LT7182S_STATUS_IOUT_TYPE
Definition: lt7182s.h:289
LT7182S_STORE_USER
@ LT7182S_STORE_USER
Definition: lt7182s.h:310
LT7182S_MFR_PGOOD_DELAY
#define LT7182S_MFR_PGOOD_DELAY
Definition: lt7182s.h:162
LT7182S_VOUT_MAX
#define LT7182S_VOUT_MAX
Definition: lt7182s.h:71
lt7182s_vout_tr
int lt7182s_vout_tr(struct lt7182s_dev *dev, int channel, int tr)
Set output voltage transition rate.
Definition: lt7182s.c:1228
LT7182S_TOFF_FALL_TYPE
@ LT7182S_TOFF_FALL_TYPE
Definition: lt7182s.h:302
lt7182s_status_type
lt7182s_status_type
Definition: lt7182s.h:286
no_os_gpio_desc
Structure holding the GPIO descriptor.
Definition: no_os_gpio.h:96
lt7182s_operation_type
lt7182s_operation_type
Definition: lt7182s.h:248
lt7182s_init_param::run0_param
struct no_os_gpio_init_param * run0_param
Definition: lt7182s.h:342
LT7182S_VOUT_MODE
#define LT7182S_VOUT_MODE
Definition: lt7182s.h:69
lt7182s_vout_margin
int lt7182s_vout_margin(struct lt7182s_dev *dev, int channel, int margin_high, int margin_low)
Set output voltage margin.
Definition: lt7182s.c:1243
lt7182s_status::temp
uint8_t temp
Definition: lt7182s.h:368
LT7182S_IEEE754_MIN_MANTISSA
#define LT7182S_IEEE754_MIN_MANTISSA
Definition: lt7182s.h:192
lt7182s_write_word_data
int lt7182s_write_word_data(struct lt7182s_dev *dev, int page, uint8_t cmd, int data)
Converts value to register data and do PMBus write word operation.
Definition: lt7182s.c:1028
LT7182S_VOUT_OV_FAULT_LIMIT_TYPE
@ LT7182S_VOUT_OV_FAULT_LIMIT_TYPE
Definition: lt7182s.h:273
no_os_pwm_desc
Structure representing an PWM generator device.
Definition: no_os_pwm.h:93
LT7182S_RESTORE_USER
@ LT7182S_RESTORE_USER
Definition: lt7182s.h:311
LT7182S_MFR_VIN_PEAK
#define LT7182S_MFR_VIN_PEAK
Definition: lt7182s.h:147
LT7182S_MFR_PWM_PHASE
#define LT7182S_MFR_PWM_PHASE
Definition: lt7182s.h:164
LT7182S_OT_FAULT_LIMIT
#define LT7182S_OT_FAULT_LIMIT
Definition: lt7182s.h:89
LT7182S_VIN_ON
#define LT7182S_VIN_ON
Definition: lt7182s.h:77
LT7182S_VOUT_OV_FAULT_LIMIT
#define LT7182S_VOUT_OV_FAULT_LIMIT
Definition: lt7182s.h:80
lt7182s_vout_tr
int lt7182s_vout_tr(struct lt7182s_dev *dev, int channel, int tr)
Set output voltage transition rate.
Definition: lt7182s.c:1228
lt7182s_limit_type
lt7182s_limit_type
Definition: lt7182s.h:272
LT7182S_READ_VIN
#define LT7182S_READ_VIN
Definition: lt7182s.h:114
no_os_i2c_desc
Structure holding I2C address descriptor.
Definition: no_os_i2c.h:101
lt7182s_read_byte
int lt7182s_read_byte(struct lt7182s_dev *dev, int page, uint8_t cmd, uint8_t *data)
Perform a raw PMBus read byte operation.
Definition: lt7182s.c:865
no_os_pwm_init
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
lt7182s_init_param::external_clk_en
bool external_clk_en
Definition: lt7182s.h:354
LT7182S_MFR_EE_USER_WP
#define LT7182S_MFR_EE_USER_WP
Definition: lt7182s.h:169
no_os_i2c_read
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
LT7182S_MFR_NOT_PGOOD_DELAY
#define LT7182S_MFR_NOT_PGOOD_DELAY
Definition: lt7182s.h:163
lt7182s_set_timing
int lt7182s_set_timing(struct lt7182s_dev *dev, int channel, enum lt7182s_timing_type timing_type, int time)
Set timing values.
Definition: lt7182s.c:1305
no_os_i2c.h
Header file of I2C Interface.
lt7182s_vout_value
int lt7182s_vout_value(struct lt7182s_dev *dev, int channel, int vout_command, int vout_max)
Set output voltage and its upper limit.
Definition: lt7182s.c:1206
LT7182_RETRY_DELAY_TYPE
@ LT7182_RETRY_DELAY_TYPE
Definition: lt7182s.h:303
LT7182S_ADC_CTRL_LOW_FREQ_BIT
#define LT7182S_ADC_CTRL_LOW_FREQ_BIT
Definition: lt7182s.h:218
no_os_pwm.h
Header file of PWM Interface.
LT7182S_DATA_FORMAT_LINEAR
@ LT7182S_DATA_FORMAT_LINEAR
Definition: lt7182s.h:244
LT7182S_ZONE_CONFIG
#define LT7182S_ZONE_CONFIG
Definition: lt7182s.h:57
no_os_field_get
uint32_t no_os_field_get(uint32_t mask, uint32_t word)
LT7182S_VOUT_OV_FAULT_RESPONSE
#define LT7182S_VOUT_OV_FAULT_RESPONSE
Definition: lt7182s.h:81
LT7182S_CONFIG_ALL_FORMAT_BIT
#define LT7182S_CONFIG_ALL_FORMAT_BIT
Definition: lt7182s.h:220
LT7182S_STATUS_INPUT
#define LT7182S_STATUS_INPUT
Definition: lt7182s.h:109
no_os_crc8
uint8_t no_os_crc8(const uint8_t *table, const uint8_t *pdata, size_t nbytes, uint8_t crc)
lt7182s_init_param::i2c_init
struct no_os_i2c_init_param * i2c_init
Definition: lt7182s.h:339
lt7182s_init_param::pg1_param
struct no_os_gpio_init_param * pg1_param
Definition: lt7182s.h:341
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
no_os_get_unaligned_le16
uint16_t no_os_get_unaligned_le16(uint8_t *buf)
lt7182s_status::byte
uint8_t byte
Definition: lt7182s.h:364
LT7182S_MFR_RESET
#define LT7182S_MFR_RESET
Definition: lt7182s.h:170
lt7182s_dev::format
enum lt7182s_data_format format
Definition: lt7182s.h:332
LT7182S_IEEE754_MAX_MANTISSA
#define LT7182S_IEEE754_MAX_MANTISSA
Definition: lt7182s.h:191
lt7182s_read_word_data
int lt7182s_read_word_data(struct lt7182s_dev *dev, int page, uint8_t cmd, int *data)
Perform a PMBus read word operation and converts to actual value.
Definition: lt7182s.c:1006
LT7182S_VIN_PEAK
@ LT7182S_VIN_PEAK
Definition: lt7182s.h:268
lt7182s_read_value
int lt7182s_read_value(struct lt7182s_dev *dev, int channel, enum lt7182s_value_type value_type, int *value)
Read a value.
Definition: lt7182s.c:1107
lt7182s_init_param::fault0_cfg
enum lt7182s_fault_pin_config fault0_cfg
Definition: lt7182s.h:351
LT7182S_IEEE754_SIGN_BIT
#define LT7182S_IEEE754_SIGN_BIT
Definition: lt7182s.h:188
lt7182s_set_channel_state
int lt7182s_set_channel_state(struct lt7182s_dev *dev, int channel, bool state)
Set channel state using the RUN pin.
Definition: lt7182s.c:1440
no_os_i2c_init_param
Structure holding the parameters for I2C initialization.
Definition: no_os_i2c.h:64
NULL
#define NULL
Definition: wrapper.h:64
LT7182S_CHAN_1
@ LT7182S_CHAN_1
Definition: lt7182s.h:234
LT7182S_MFR_RESTART_DELAY
#define LT7182S_MFR_RESTART_DELAY
Definition: lt7182s.h:145
LT7182S_STATUS_MFR_SPECIFIC
#define LT7182S_STATUS_MFR_SPECIFIC
Definition: lt7182s.h:112
LT7182S_STATUS_BYTE
#define LT7182S_STATUS_BYTE
Definition: lt7182s.h:105
init_param
struct ad7616_init_param init_param
Definition: ad7616_sdz.c:113
LT7182S_TOFF_DELAY_TYPE
@ LT7182S_TOFF_DELAY_TYPE
Definition: lt7182s.h:301
LT7182S_STATUS_WORD_TYPE_MSK
#define LT7182S_STATUS_WORD_TYPE_MSK
Definition: lt7182s.h:211
lt7182s_init_param::fault1_cfg
enum lt7182s_fault_pin_config fault1_cfg
Definition: lt7182s.h:352
LT7182S_MFR_CHAN_CONFIG
#define LT7182S_MFR_CHAN_CONFIG
Definition: lt7182s.h:137
lt7182s_read_value
int lt7182s_read_value(struct lt7182s_dev *dev, int channel, enum lt7182s_value_type value_type, int *value)
Read a value.
Definition: lt7182s.c:1107
lt7182s_data_format
lt7182s_data_format
Definition: lt7182s.h:243
lt7182s_status
Definition: lt7182s.h:362
lt7182s_set_timing
int lt7182s_set_timing(struct lt7182s_dev *dev, int channel, enum lt7182s_timing_type timing_type, int time)
Set timing values.
Definition: lt7182s.c:1305
lt7182s_dev::run1_desc
struct no_os_gpio_desc * run1_desc
Definition: lt7182s.h:325
LT7182S_STATUS_ALL_TYPE_MSK
#define LT7182S_STATUS_ALL_TYPE_MSK
Definition: lt7182s.h:212
LT7182S_CLEAR_FAULTS
#define LT7182S_CLEAR_FAULTS
Definition: lt7182s.h:54
ID_LT7182S
@ ID_LT7182S
Definition: lt7182s.h:228
lt7182s_init
int lt7182s_init(struct lt7182s_dev **dev, struct lt7182s_init_param *init_param)
Initialize the device structure.
Definition: lt7182s.c:526
LT7182S_STATUS_VOUT_TYPE
@ LT7182S_STATUS_VOUT_TYPE
Definition: lt7182s.h:288
LT7182S_LIN11_EXPONENT
#define LT7182S_LIN11_EXPONENT(x)
Definition: lt7182s.h:183
lt7182s_vout_margin
int lt7182s_vout_margin(struct lt7182s_dev *dev, int channel, int margin_high, int margin_low)
Set output voltage margin.
Definition: lt7182s.c:1243
LT7182S_OPERATION_SEQ_OFF
@ LT7182S_OPERATION_SEQ_OFF
Definition: lt7182s.h:253
LT7182S_TON_MAX_FAULT_LIMIT
#define LT7182S_TON_MAX_FAULT_LIMIT
Definition: lt7182s.h:99
LT7182S_STATUS_BYTE_TYPE
@ LT7182S_STATUS_BYTE_TYPE
Definition: lt7182s.h:287
lt7182s_write_word_data
int lt7182s_write_word_data(struct lt7182s_dev *dev, int page, uint8_t cmd, int data)
Converts value to register data and do PMBus write word operation.
Definition: lt7182s.c:1028
lt7182s_send_byte
int lt7182s_send_byte(struct lt7182s_dev *dev, int page, uint8_t cmd)
Send a PMBus command to the device.
Definition: lt7182s.c:838
no_os_gpio.h
Header file of GPIO Interface.
LT7182S_FREQUENCY_SWITCH
#define LT7182S_FREQUENCY_SWITCH
Definition: lt7182s.h:76
LT7182S_IC_DEVICE_ID
#define LT7182S_IC_DEVICE_ID
Definition: lt7182s.h:128
LT7182S_CHAN_0
@ LT7182S_CHAN_0
Definition: lt7182s.h:233
LT7182S_MFR_FAULT_PROPAGATE
#define LT7182S_MFR_FAULT_PROPAGATE
Definition: lt7182s.h:139
lt7182s_fault_pin_config
lt7182s_fault_pin_config
Definition: lt7182s.h:238
lt7182s_read_status
int lt7182s_read_status(struct lt7182s_dev *dev, int channel, enum lt7182s_status_type status_type, struct lt7182s_status *status)
Read statuses.
Definition: lt7182s.c:1130
LT7182S_VOUT_UV_FAULT_RESPONSE
#define LT7182S_VOUT_UV_FAULT_RESPONSE
Definition: lt7182s.h:85
LT7182S_DATA_FORMAT_IEEE754
@ LT7182S_DATA_FORMAT_IEEE754
Definition: lt7182s.h:245
lt7182s_sync_config
int lt7182s_sync_config(struct lt7182s_dev *dev, bool input_clk, bool output_clk)
Configure SYNC pin for clock synchronization.
Definition: lt7182s.c:1461
lt7182s_read_word_data
int lt7182s_read_word_data(struct lt7182s_dev *dev, int page, uint8_t cmd, int *data)
Perform a PMBus read word operation and converts to actual value.
Definition: lt7182s.c:1006
lt7182s_adc_control
int lt7182s_adc_control(struct lt7182s_dev *dev, bool low_freq_telemetry, bool debug_telemetry)
Configure ADC control.
Definition: lt7182s.c:1489
LT7182S_PWM_FORCED_CONTINUOUS_MODE
@ LT7182S_PWM_FORCED_CONTINUOUS_MODE
Definition: lt7182s.h:316
LT7182S_OT_WARN_LIMIT
#define LT7182S_OT_WARN_LIMIT
Definition: lt7182s.h:91
lt7182s_init_param::format
enum lt7182s_data_format format
Definition: lt7182s.h:350
LT7182S_STATUS_WORD_TYPE
@ LT7182S_STATUS_WORD_TYPE
Definition: lt7182s.h:294
lt7182s_clear_faults
int lt7182s_clear_faults(struct lt7182s_dev *dev)
Clear all asserted faults.
Definition: lt7182s.c:1548
LT7182S_READ_TEMPERATURE_1
#define LT7182S_READ_TEMPERATURE_1
Definition: lt7182s.h:118
LT7182S_SYNC_CLK_OUTPUT_BIT
#define LT7182S_SYNC_CLK_OUTPUT_BIT
Definition: lt7182s.h:217
LT7182S_READ_VOUT
#define LT7182S_READ_VOUT
Definition: lt7182s.h:116
LT7182S_LIN11_MANTISSA_MSK
#define LT7182S_LIN11_MANTISSA_MSK
Definition: lt7182s.h:181
lt7182s_send_byte
int lt7182s_send_byte(struct lt7182s_dev *dev, int page, uint8_t cmd)
Send a PMBus command to the device.
Definition: lt7182s.c:838
LT7182S_RESTART_DELAY_TYPE
@ LT7182S_RESTART_DELAY_TYPE
Definition: lt7182s.h:304
LT7182S_VOUT_PEAK
@ LT7182S_VOUT_PEAK
Definition: lt7182s.h:267
no_os_util.h
Header file of utility functions.
LT7182S_STATUS_MFR_SPECIFIC_TYPE_MSK
#define LT7182S_STATUS_MFR_SPECIFIC_TYPE_MSK
Definition: lt7182s.h:210
lt7182s_init_param::sync_param
struct no_os_pwm_init_param * sync_param
Definition: lt7182s.h:347
lt7182s_dev::fault1_desc
struct no_os_gpio_desc * fault1_desc
Definition: lt7182s.h:328
LT7182S_MFR_VOUT_PEAK
#define LT7182S_MFR_VOUT_PEAK
Definition: lt7182s.h:146
lt7182s_dev::fault0_desc
struct no_os_gpio_desc * fault0_desc
Definition: lt7182s.h:327
LT7182S_MFR_READ_EXTVCC
#define LT7182S_MFR_READ_EXTVCC
Definition: lt7182s.h:135
no_os_gpio_direction_output
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
LT7182S_VIN
@ LT7182S_VIN
Definition: lt7182s.h:257
LT7182S_CONFIG_ALL_PEC_BIT
#define LT7182S_CONFIG_ALL_PEC_BIT
Definition: lt7182s.h:221
lt7182s_init_param::chip_id
enum lt7182s_chip_id chip_id
Definition: lt7182s.h:349
lt7182s_dev::pg1_desc
struct no_os_gpio_desc * pg1_desc
Definition: lt7182s.h:323
no_os_crc8.h
Header file of CRC-8 computation.
LT7182S_READ_IIN
#define LT7182S_READ_IIN
Definition: lt7182s.h:115
errno.h
Error macro definition for ARM Compiler.
lt7182s_output_channel
lt7182s_output_channel
Definition: lt7182s.h:232
lt7182s_set_channel_state
int lt7182s_set_channel_state(struct lt7182s_dev *dev, int channel, bool state)
Set channel state using the RUN pin.
Definition: lt7182s.c:1440
LT7182S_VOUT_MARGIN_LOW
#define LT7182S_VOUT_MARGIN_LOW
Definition: lt7182s.h:73
lt7182s_init_param
Definition: lt7182s.h:338
lt7182s_software_reset
int lt7182s_software_reset(struct lt7182s_dev *dev)
Perform a device software reset.
Definition: lt7182s.c:1559
LT7182S_IEEE754_MANTISSA_MSK
#define LT7182S_IEEE754_MANTISSA_MSK
Definition: lt7182s.h:190
LT7182S_STORE_USER_ALL
#define LT7182S_STORE_USER_ALL
Definition: lt7182s.h:62
LT7182S_LOCK_USER
@ LT7182S_LOCK_USER
Definition: lt7182s.h:308
LT7182S_TEMP
@ LT7182S_TEMP
Definition: lt7182s.h:261
LT7182S_MFR_IOUT_PEAK
#define LT7182S_MFR_IOUT_PEAK
Definition: lt7182s.h:142
LT7182S_MFR_DISCHARGE_THRESHOLD
#define LT7182S_MFR_DISCHARGE_THRESHOLD
Definition: lt7182s.h:150
no_os_gpio_get_optional
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