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 
229 };
230 
235 };
236 
240 };
241 
245 };
246 
253 };
254 
269 };
270 
283 };
284 
295 };
296 
304 };
305 
312 };
313 
317 };
318 
319 struct lt7182s_dev {
329 
332  int page;
334  bool crc_en;
335 };
336 
347 
352 
354  bool crc_en;
355 };
356 
358  char *name;
359 };
360 
362  uint16_t word;
363  uint8_t byte;
364  uint8_t vout;
365  uint8_t iout;
366  uint8_t input;
367  uint8_t temp;
368  uint8_t cml;
369  uint8_t mfr_specific;
370 };
371 
372 /******************************************************************************/
373 /************************ Functions Declarations ******************************/
374 /******************************************************************************/
375 
376 /* Initialize the device structure */
377 int lt7182s_init(struct lt7182s_dev **dev,
379 
380 /* Free or remove device instance */
381 int lt7182s_remove(struct lt7182s_dev *dev);
382 
383 /* Set PMBus page and phase */
384 int lt7182s_set_page(struct lt7182s_dev *dev, int page);
385 
386 /* Send a PMBus command to the device */
387 int lt7182s_send_byte(struct lt7182s_dev *dev, int page, uint8_t cmd);
388 
389 /* Perform a PMBus read_byte operation */
390 int lt7182s_read_byte(struct lt7182s_dev *dev, int page,
391  uint8_t cmd, uint8_t *data);
392 
393 /* Perform a PMBus write_byte operation */
394 int lt7182s_write_byte(struct lt7182s_dev *dev, int page,
395  uint8_t cmd, uint8_t value);
396 
397 /* Perform a PMBus read_word operation */
398 int lt7182s_read_word(struct lt7182s_dev *dev, int page,
399  uint8_t cmd, uint16_t *word);
400 
401 /* Perform a PMBus write_word operation */
402 int lt7182s_write_word(struct lt7182s_dev *dev, int page,
403  uint8_t cmd, uint16_t word);
404 
405 /* Perform a PMBus read_word operation then perform conversion*/
406 int lt7182s_read_word_data(struct lt7182s_dev *dev, int page,
407  uint8_t cmd, int *data);
408 
409 /* Perform conversion then perform a PMBus write_word operation */
410 int lt7182s_write_word_data(struct lt7182s_dev *dev, int page,
411  uint8_t cmd, int data);
412 
413 /* Read a block of bytes */
414 int lt7182s_read_block_data(struct lt7182s_dev *dev, int page,
415  uint8_t cmd, uint8_t *data, size_t nbytes);
416 
417 /* Read specific value type */
418 int lt7182s_read_value(struct lt7182s_dev *dev, int channel,
419  enum lt7182s_value_type value_type,
420  int *value);
421 
422 /* Read status */
423 int lt7182s_read_status(struct lt7182s_dev *dev, int channel,
424  enum lt7182s_status_type status_type,
425  struct lt7182s_status *status);
426 
427 /* Set VOUT parameters: VOUT_COMMAND and VOUT_MAX */
428 int lt7182s_vout_value(struct lt7182s_dev *dev, int channel,
429  int vout_command, int vout_max);
430 
431 /* Set VOUT transition rate */
432 int lt7182s_vout_tr(struct lt7182s_dev *dev, int channel, int tr);
433 
434 /* Set VOUT margins */
435 int lt7182s_vout_margin(struct lt7182s_dev *dev, int channel,
436  int margin_high, int margin_low);
437 
438 /* Set VIN threshold when to start power conversion */
439 int lt7182s_set_vin(struct lt7182s_dev *dev, int channel,
440  int vin_on, int vin_off);
441 
442 /* Set timing values */
443 int lt7182s_set_timing(struct lt7182s_dev *dev, int channel,
444  enum lt7182s_timing_type timing_type, int time);
445 
446 /* Set switching frequency */
447 int lt7182s_switch_freq(struct lt7182s_dev *dev, int freq);
448 
449 /* Set PWM mode of a channel */
450 int lt7182s_pwm_mode(struct lt7182s_dev *dev, int channel,
451  enum lt7182s_pwm_mode pwm_mode);
452 
453 /* Set PWM phase offset of a channel */
454 int lt7182s_pwm_phase(struct lt7182s_dev *dev, int channel,
455  int phase);
456 
457 /* Set fault/warning limit values */
458 int lt7182s_set_limit(struct lt7182s_dev *dev, int channel,
459  enum lt7182s_limit_type limit, int limit_val);
460 
461 /* Set operation */
462 int lt7182s_set_operation(struct lt7182s_dev *dev, int channel,
463  enum lt7182s_operation_type operation);
464 
465 /* Set channel state */
466 int lt7182s_set_channel_state(struct lt7182s_dev *dev, int channel,
467  bool state);
468 
469 /* Set clock synchronization configs */
470 int lt7182s_sync_config(struct lt7182s_dev *dev,
471  bool input_clk,
472  bool output_clk);
473 
474 /* Set ADC telemetry control */
475 int lt7182s_adc_control(struct lt7182s_dev *dev, bool low_freq_telemetry,
476  bool debug_telemetry);
477 
478 /* NVM/EEPROM user commands */
479 int lt7182s_nvm_cmd(struct lt7182s_dev *dev, enum lt7182s_nvm_cmd_type cmd);
480 
481 /* Clear status faults */
482 int lt7182s_clear_faults(struct lt7182s_dev *dev);
483 
484 /* Software reset */
485 int lt7182s_software_reset(struct lt7182s_dev *dev);
486 
487 #endif /* __LT7182S_H__ */
LT7182S_POUT
@ LT7182S_POUT
Definition: lt7182s.h:262
lt7182s_set_operation
int lt7182s_set_operation(struct lt7182s_dev *dev, int channel, enum lt7182s_operation_type operation)
Set channel operation.
Definition: lt7182s.c:1422
lt7182s_nvm_cmd_type
lt7182s_nvm_cmd_type
Definition: lt7182s.h:306
LT7182S_STATUS_ALL_TYPE
@ LT7182S_STATUS_ALL_TYPE
Definition: lt7182s.h:294
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:1378
LT7182S_VOUT_OV_WARN_LIMIT_TYPE
@ LT7182S_VOUT_OV_WARN_LIMIT_TYPE
Definition: lt7182s.h:273
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:1556
LT7182S_EXTVCC
@ LT7182S_EXTVCC
Definition: lt7182s.h:264
lt7182s_chip_info
Definition: lt7182s.h:357
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:263
lt7182s_init_param::alert_param
struct no_os_gpio_init_param * alert_param
Definition: lt7182s.h:343
lt7182s_status::vout
uint8_t vout
Definition: lt7182s.h:364
LT7182S_COMPARE_USER
@ LT7182S_COMPARE_USER
Definition: lt7182s.h:311
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:323
lt7182s_set_operation
int lt7182s_set_operation(struct lt7182s_dev *dev, int channel, enum lt7182s_operation_type operation)
Set channel operation.
Definition: lt7182s.c:1422
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:344
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:345
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:1458
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:1545
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:1403
LT7182S_IOUT_OC_WARN_LIMIT_TYPE
@ LT7182S_IOUT_OC_WARN_LIMIT_TYPE
Definition: lt7182s.h:277
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:257
LT7182S_LIN11_EXPONENT_MIN
#define LT7182S_LIN11_EXPONENT_MIN
Definition: lt7182s.h:180
lt7182s_timing_type
lt7182s_timing_type
Definition: lt7182s.h:297
lt7182s_dev::alert_desc
struct no_os_gpio_desc * alert_desc
Definition: lt7182s.h:325
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:234
LT7182S_IOUT
@ LT7182S_IOUT
Definition: lt7182s.h:259
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:1403
LT7182S_VOUT_UV_FAULT_LIMIT_TYPE
@ LT7182S_VOUT_UV_FAULT_LIMIT_TYPE
Definition: lt7182s.h:274
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:365
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:1048
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:354
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:366
LT7182S_FAULT_PIN_INPUT
@ LT7182S_FAULT_PIN_INPUT
Definition: lt7182s.h:238
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:333
lt7182s_init
int lt7182s_init(struct lt7182s_dev **device, struct lt7182s_init_param *init_param)
Initialize the device structure.
Definition: lt7182s.c:523
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:901
LT7182S_OT_WARN_LIMIT_TYPE
@ LT7182S_OT_WARN_LIMIT_TYPE
Definition: lt7182s.h:279
LT7182S_STATUS_CML_TYPE_MSK
#define LT7182S_STATUS_CML_TYPE_MSK
Definition: lt7182s.h:209
lt7182s_value_type
lt7182s_value_type
Definition: lt7182s.h:255
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:328
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:973
LT7182S_IIN_OC_WARN_LIMIT_TYPE
@ LT7182S_IIN_OC_WARN_LIMIT_TYPE
Definition: lt7182s.h:276
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:319
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:258
lt7182s_pwm_phase
int lt7182s_pwm_phase(struct lt7182s_dev *dev, int channel, int phase)
Set output PWM phase.
Definition: lt7182s.c:1378
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:289
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:1509
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:1317
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:1266
LT7182S_OT_FAULT_LIMIT_TYPE
@ LT7182S_OT_FAULT_LIMIT_TYPE
Definition: lt7182s.h:278
lt7182s_init_param::run1_param
struct no_os_gpio_init_param * run1_param
Definition: lt7182s.h:342
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:249
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:369
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:1048
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:1266
LT7182S_PWM_PULSE_SKIP_MODE
@ LT7182S_PWM_PULSE_SKIP_MODE
Definition: lt7182s.h:316
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:280
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:901
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:773
lt7182s_init_param::pg0_param
struct no_os_gpio_init_param * pg0_param
Definition: lt7182s.h:339
lt7182s_dev::page
int page
Definition: lt7182s.h:332
lt7182s.h
lt7182s_dev::pg0_desc
struct no_os_gpio_desc * pg0_desc
Definition: lt7182s.h:321
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:973
LT7182S_FREQUENCY
@ LT7182S_FREQUENCY
Definition: lt7182s.h:261
lt7182s_dev::chip_id
enum lt7182s_chip_id chip_id
Definition: lt7182s.h:330
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:281
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:298
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:1509
LT7182S_TON_RISE_TYPE
@ LT7182S_TON_RISE_TYPE
Definition: lt7182s.h:299
LT7182S_CRC_POLYNOMIAL
#define LT7182S_CRC_POLYNOMIAL
Definition: lt7182s.h:173
lt7182s_dev::crc_en
bool crc_en
Definition: lt7182s.h:334
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:1317
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:1334
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:239
lt7182s_remove
int lt7182s_remove(struct lt7182s_dev *dev)
Free or remove device instance.
Definition: lt7182s.c:716
LT7182S_STATUS_INPUT_TYPE_MSK
#define LT7182S_STATUS_INPUT_TYPE_MSK
Definition: lt7182s.h:207
lt7182s_chip_info::name
char * name
Definition: lt7182s.h:358
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:292
MILLIVOLT_PER_VOLT
#define MILLIVOLT_PER_VOLT
Definition: no_os_units.h:58
LT7182S_OPERATION_MARGIN_HIGH
@ LT7182S_OPERATION_MARGIN_HIGH
Definition: lt7182s.h:250
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:1127
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:308
LT7182S_STATUS_CML
#define LT7182S_STATUS_CML
Definition: lt7182s.h:111
LT7182S_OPERATION_MARGIN_LOW
@ LT7182S_OPERATION_MARGIN_LOW
Definition: lt7182s.h:251
lt7182s_adc_control
int lt7182s_adc_control(struct lt7182s_dev *dev, bool low_freq_telemetry, bool debug_telemetry)
Configure ADC control.
Definition: lt7182s.c:1486
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
lt7182s_dev::i2c_desc
struct no_os_i2c_desc * i2c_desc
Definition: lt7182s.h:320
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:773
lt7182s_status::word
uint16_t word
Definition: lt7182s.h:362
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:862
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:931
LT7182S_VOUT_UV_WARN_LIMIT_TYPE
@ LT7182S_VOUT_UV_WARN_LIMIT_TYPE
Definition: lt7182s.h:275
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:1203
LT7182S_VOUT_OV_WARN_LIMIT
#define LT7182S_VOUT_OV_WARN_LIMIT
Definition: lt7182s.h:82
lt7182s_status::cml
uint8_t cml
Definition: lt7182s.h:368
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:282
LT7182S_OPERATION_OFF
@ LT7182S_OPERATION_OFF
Definition: lt7182s.h:248
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:716
LT7182S_IOUT_PEAK
@ LT7182S_IOUT_PEAK
Definition: lt7182s.h:265
LT7182S_FREQ_MAX
#define LT7182S_FREQ_MAX
Definition: lt7182s.h:196
LT7182S_STATUS_TEMP_TYPE
@ LT7182S_STATUS_TEMP_TYPE
Definition: lt7182s.h:290
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:291
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:931
LT7182S_LIN11_EXPONENT_MAX
#define LT7182S_LIN11_EXPONENT_MAX
Definition: lt7182s.h:179
LT7182S_TEMP_PEAK
@ LT7182S_TEMP_PEAK
Definition: lt7182s.h:268
LT7182S_LIN16_EXPONENT
#define LT7182S_LIN16_EXPONENT
Definition: lt7182s.h:185
lt7182s_pwm_mode
lt7182s_pwm_mode
Definition: lt7182s.h:314
LT7182S_STATUS_IOUT_TYPE
@ LT7182S_STATUS_IOUT_TYPE
Definition: lt7182s.h:288
LT7182S_STORE_USER
@ LT7182S_STORE_USER
Definition: lt7182s.h:309
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:1225
LT7182S_TOFF_FALL_TYPE
@ LT7182S_TOFF_FALL_TYPE
Definition: lt7182s.h:301
lt7182s_status_type
lt7182s_status_type
Definition: lt7182s.h:285
no_os_gpio_desc
Structure holding the GPIO descriptor.
Definition: no_os_gpio.h:96
lt7182s_operation_type
lt7182s_operation_type
Definition: lt7182s.h:247
lt7182s_init_param::run0_param
struct no_os_gpio_init_param * run0_param
Definition: lt7182s.h:341
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:1240
lt7182s_status::temp
uint8_t temp
Definition: lt7182s.h:367
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:1025
LT7182S_VOUT_OV_FAULT_LIMIT_TYPE
@ LT7182S_VOUT_OV_FAULT_LIMIT_TYPE
Definition: lt7182s.h:272
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:310
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:1225
lt7182s_limit_type
lt7182s_limit_type
Definition: lt7182s.h:271
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:862
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:353
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:1302
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:1203
LT7182_RETRY_DELAY_TYPE
@ LT7182_RETRY_DELAY_TYPE
Definition: lt7182s.h:302
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:243
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:338
lt7182s_init_param::pg1_param
struct no_os_gpio_init_param * pg1_param
Definition: lt7182s.h:340
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:363
LT7182S_MFR_RESET
#define LT7182S_MFR_RESET
Definition: lt7182s.h:170
lt7182s_dev::format
enum lt7182s_data_format format
Definition: lt7182s.h:331
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:1003
LT7182S_VIN_PEAK
@ LT7182S_VIN_PEAK
Definition: lt7182s.h:267
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:1104
lt7182s_init_param::fault0_cfg
enum lt7182s_fault_pin_config fault0_cfg
Definition: lt7182s.h:350
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:1437
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:233
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:300
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:351
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:1104
lt7182s_data_format
lt7182s_data_format
Definition: lt7182s.h:242
lt7182s_status
Definition: lt7182s.h:361
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:1302
lt7182s_dev::run1_desc
struct no_os_gpio_desc * run1_desc
Definition: lt7182s.h:324
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:523
LT7182S_STATUS_VOUT_TYPE
@ LT7182S_STATUS_VOUT_TYPE
Definition: lt7182s.h:287
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:1240
LT7182S_OPERATION_SEQ_OFF
@ LT7182S_OPERATION_SEQ_OFF
Definition: lt7182s.h:252
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:286
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:1025
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:835
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:232
LT7182S_MFR_FAULT_PROPAGATE
#define LT7182S_MFR_FAULT_PROPAGATE
Definition: lt7182s.h:139
lt7182s_fault_pin_config
lt7182s_fault_pin_config
Definition: lt7182s.h:237
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:1127
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:244
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:1458
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:1003
lt7182s_adc_control
int lt7182s_adc_control(struct lt7182s_dev *dev, bool low_freq_telemetry, bool debug_telemetry)
Configure ADC control.
Definition: lt7182s.c:1486
LT7182S_PWM_FORCED_CONTINUOUS_MODE
@ LT7182S_PWM_FORCED_CONTINUOUS_MODE
Definition: lt7182s.h:315
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:349
LT7182S_STATUS_WORD_TYPE
@ LT7182S_STATUS_WORD_TYPE
Definition: lt7182s.h:293
lt7182s_clear_faults
int lt7182s_clear_faults(struct lt7182s_dev *dev)
Clear all asserted faults.
Definition: lt7182s.c:1545
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:835
LT7182S_RESTART_DELAY_TYPE
@ LT7182S_RESTART_DELAY_TYPE
Definition: lt7182s.h:303
LT7182S_VOUT_PEAK
@ LT7182S_VOUT_PEAK
Definition: lt7182s.h:266
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:346
lt7182s_dev::fault1_desc
struct no_os_gpio_desc * fault1_desc
Definition: lt7182s.h:327
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:326
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:256
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:348
lt7182s_dev::pg1_desc
struct no_os_gpio_desc * pg1_desc
Definition: lt7182s.h:322
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:231
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:1437
LT7182S_VOUT_MARGIN_LOW
#define LT7182S_VOUT_MARGIN_LOW
Definition: lt7182s.h:73
lt7182s_init_param
Definition: lt7182s.h:337
lt7182s_software_reset
int lt7182s_software_reset(struct lt7182s_dev *dev)
Perform a device software reset.
Definition: lt7182s.c:1556
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:307
LT7182S_TEMP
@ LT7182S_TEMP
Definition: lt7182s.h:260
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