no-OS
lt8722.h
Go to the documentation of this file.
1 /***************************************************************************/
33 #ifndef __LT8722_H__
34 #define __LT8722_H__
35 
36 #include <stdbool.h>
37 #include <stdint.h>
38 #include <stdio.h>
39 #include "no_os_gpio.h"
40 #include "no_os_spi.h"
41 #include "no_os_units.h"
42 #include "no_os_util.h"
43 
44 #define LT8722_CRC_POLYNOMIAL 0x07
45 
46 #define LT8722_MAX_REGISTER_SIZE 4
47 #define LT8722_NUM_REGISTERS 8
48 
49 // LT8722 SPI Command
50 #define LT8722_STATUS_ACQUISITION_COMMAND 0xF0
51 #define LT8722_DATA_WRITE_COMMAND 0xF2
52 #define LT8722_DATA_READ_COMMAND 0xF4
53 
54 // LT8722 SPI Command Size in Bytes
55 #define LT8722_STATUS_ACQUISITION_COMMAND_SIZE 4
56 #define LT8722_DATA_WRITE_COMMAND_SIZE 8
57 #define LT8722_DATA_READ_COMMAND_SIZE 8
58 
59 // LT8722 SPI Acknowledge
60 #define LT8722_ACK_ACKNOWLEDGE 0xA5
61 #define LT8722_ACK_NON_ACKNOWLEDGE 0xC3
62 #define LT8722_ACK_UNSUPPORTED_ADDRESS 0x0F
63 #define LT8722_ACK_STUCK_AT_0 0x00
64 #define LT8722_ACK_STUCK_AT_1 0xFF
65 
66 // LT8722 SPI Register Address
67 #define LT8722_SPIS_COMMAND 0x00
68 #define LT8722_SPIS_STATUS 0x01
69 #define LT8722_SPIS_DAC_ILIMN 0x02
70 #define LT8722_SPIS_DAC_ILIMP 0x03
71 #define LT8722_SPIS_DAC 0x04
72 #define LT8722_SPIS_OV_CLAMP 0x05
73 #define LT8722_SPIS_UV_CLAMP 0x06
74 #define LT8722_SPIS_AMUX 0x07
75 
76 // LT8722 SPI Register Size in Bits
77 #define LT8722_SPIS_COMMAND_SIZE 22
78 #define LT8722_SPIS_STATUS_SIZE 11
79 #define LT8722_SPIS_DAC_ILIMN_SIZE 9
80 #define LT8722_SPIS_DAC_ILIMP_SIZE 9
81 #define LT8722_SPIS_DAC_SIZE 32
82 #define LT8722_SPIS_OV_CLAMP_SIZE 4
83 #define LT8722_SPIS_UV_CLAMP_SIZE 4
84 #define LT8722_SPIS_AMUX_SIZE 7
85 
86 // LT8722 SPI Register Mask
87 #define LT8722_SPIS_COMMAND_MASK NO_OS_GENMASK(21, 0)
88 #define LT8722_SPIS_STATUS_MASK NO_OS_GENMASK(10, 0)
89 #define LT8722_SPIS_DAC_ILIMN_MASK NO_OS_GENMASK(8, 0)
90 #define LT8722_SPIS_DAC_ILIMP_MASK NO_OS_GENMASK(8, 0)
91 #define LT8722_SPIS_DAC_MASK NO_OS_GENMASK(31, 0)
92 #define LT8722_SPIS_OV_CLAMP_MASK NO_OS_GENMASK(3, 0)
93 #define LT8722_SPIS_UV_CLAMP_MASK NO_OS_GENMASK(3, 0)
94 #define LT8722_SPIS_AMUX_MASK NO_OS_GENMASK(6, 0)
95 
96 // LT8722 SPI Register Default Value
97 #define LT8722_SPIS_COMMAND_DEFAULT_VALUE 0x08A214
98 #define LT8722_SPIS_STATUS_DEFAULT_VALUE 0x0
99 #define LT8722_SPIS_DAC_ILIMN_DEFAULT_VALUE 0x1FF
100 #define LT8722_SPIS_DAC_ILIMP_DEFAULT_VALUE 0x000
101 #define LT8722_SPIS_DAC_DEFAULT_VALUE 0xFF000000
102 #define LT8722_SPIS_OV_CLAMP_DEFAULT_VALUE 0xF
103 #define LT8722_SPIS_UV_CLAMP_DEFAULT_VALUE 0x0
104 #define LT8722_SPIS_AMUX_DEFAULT_VALUE 0x00
105 
106 // LT8722 SPIS_COMMAND Register
107 #define LT8722_ENABLE_REQ_MASK NO_OS_BIT(0)
108 #define LT8722_SWEN_REQ_MASK NO_OS_BIT(1)
109 #define LT8722_SW_FRQ_SET_MASK NO_OS_GENMASK(4, 2)
110 #define LT8722_SW_FRQ_ADJ_MASK NO_OS_GENMASK(6, 5)
111 #define LT8722_SYS_DC_MASK NO_OS_GENMASK(8, 7)
112 #define LT8722_VCC_VREG_MASK NO_OS_BIT(9)
113 #define LT8722_SW_VC_INT_MASK NO_OS_GENMASK(13, 11)
114 #define LT8722_SPI_RST_MASK NO_OS_BIT(14)
115 #define LT8722_PWR_LIM_POS 15
116 #define LT8722_PWR_LIM_MASK NO_OS_GENMASK(18, 15)
117 
118 // LT8722 SPIS_COMMAND Register SPI_RST
119 #define LT8722_SPI_RST_RESET 0b1
120 
121 // LT8722 SPIS_STATUS Register
122 #define LT8722_SWEN_MASK NO_OS_BIT(0)
123 #define LT8722_SRVO_ILIM_MASK NO_OS_BIT(1)
124 #define LT8722_SRVO_PLIM_MASK NO_OS_BIT(2)
125 #define LT8722_MIN_OT_MASK NO_OS_BIT(3)
126 #define LT8722_POR_OCC_MASK NO_OS_BIT(4)
127 #define LT8722_OVER_CURRENT_MASK NO_OS_BIT(5)
128 #define LT8722_TSD_MASK NO_OS_BIT(6)
129 #define LT8722_VCC_UVLO_MASK NO_OS_BIT(7)
130 #define LT8722_VDDIO_UVLO_MASK NO_OS_BIT(8)
131 #define LT8722_CP_UVLO_MASK NO_OS_BIT(9)
132 #define LT8722_V2P5_UVLO_MASK NO_OS_BIT(10)
133 
134 // LT8722 faults mask
135 #define LT8722_FAULTS_MASK NO_OS_GENMASK(10, 5)
136 
137 // LT8722 SPIS_DAC_ILIMN Register
138 #define LT8722_SPIS_DAC_ILIMN_MASK NO_OS_GENMASK(8, 0)
139 
140 // LT8722 SPIS_DAC_ILIMN Register SPIS_DAC_ILIMN
141 #define LT8722_SPIS_DAC_ILIMN_MIN 0x030
142 #define LT8722_SPIS_DAC_ILIMN_MAX 0x1FF
143 
144 // LT8722 SPIS_DAC_ILIMP Register
145 #define LT8722_SPIS_DAC_ILIMP_MASK NO_OS_GENMASK(8, 0)
146 
147 // LT8722 SPIS_DAC_ILIMP Register SPIS_DAC_ILIMP
148 #define LT8722_SPIS_DAC_ILIMP_MIN 0x000
149 #define LT8722_SPIS_DAC_ILIMP_MAX 0x1CE
150 
151 // LT8722 SPIS_DAC Register
152 #define LT8722_SPIS_DAC_MASK NO_OS_GENMASK(31, 0)
153 
154 // LT8722 SPIS_OV_CLAMP Register
155 #define LT8722_SPIS_OV_CLAMP_MASK NO_OS_GENMASK(3, 0)
156 
157 // LT8722 SPIS_UV_CLAMP Register
158 #define LT8722_SPIS_UV_CLAMP_MASK NO_OS_GENMASK(3, 0)
159 
160 // LT8722 SPIS_AMUX Register
161 #define LT8722_AMUX_MASK NO_OS_GENMASK(3, 0)
162 #define LT8722_AMUX_TEST_MASK NO_OS_GENMASK(5, 4)
163 #define LT8722_AOUT_EN_MASK NO_OS_BIT(6)
164 
165 #define LT8722_DAC_RESOLUTION 25
166 #define LT8722_DAC_OFFSET 1250000000LL // nanovolts
167 #define LT8722_DAC_VREF 2500000000LL // nanovolts
168 #define LT8722_VOLTAGE_SCALE NANO
169 
179 };
180 
190 };
191 
213 };
214 
228 };
229 
239 };
240 
262 };
263 
277 };
278 
290 };
291 
313 };
314 
324 };
325 
330 struct lt8722_reg {
331  uint8_t address;
332  uint32_t default_val;
333  uint8_t size;
334 };
335 
341  uint8_t byte;
342  uint8_t size;
343 };
344 
351  struct lt8722_reg reg;
352  uint32_t data;
353  uint8_t crc;
354  uint8_t ack;
355  uint16_t status;
356 };
357 
367 };
368 
373 struct lt8722_dev {
378  uint16_t status;
379 };
380 
382 
384 int32_t lt8722_voltage_to_dac(int64_t voltage);
385 
387 int64_t lt8722_dac_to_voltage(int32_t dac);
388 
390 int lt8722_transaction(struct lt8722_dev *dev, struct lt8722_packet *packet);
391 
393 int lt8722_reg_read(struct lt8722_dev *dev, uint8_t address, uint32_t *data);
394 
396 int lt8722_reg_write(struct lt8722_dev *dev, uint8_t address, uint32_t data);
397 
399 int lt8722_reg_write_mask(struct lt8722_dev *dev, uint8_t address,
400  uint32_t mask, uint32_t data);
401 
403 int lt8722_get_status(struct lt8722_dev *dev, uint16_t *status);
404 
406 int lt8722_clear_faults(struct lt8722_dev *dev);
407 
409 int lt8722_set_enable_req(struct lt8722_dev *dev, bool value);
410 
412 int lt8722_get_enable_req(struct lt8722_dev *dev, bool *value);
413 
415 int lt8722_set_swen_req(struct lt8722_dev *dev, bool value);
416 
418 int lt8722_get_swen_req(struct lt8722_dev *dev, bool *value);
419 
421 int lt8722_set_sw_frq_set(struct lt8722_dev *dev, enum lt8722_sw_frq_set value);
422 
424 int lt8722_get_sw_frq_set(struct lt8722_dev *dev,
425  enum lt8722_sw_frq_set *value);
426 
428 int lt8722_set_sw_frq_adj(struct lt8722_dev *dev, enum lt8722_sw_frq_adj value);
429 
431 int lt8722_get_sw_frq_adj(struct lt8722_dev *dev,
432  enum lt8722_sw_frq_adj *value);
433 
435 int lt8722_set_vcc_vreg(struct lt8722_dev *dev, enum lt8722_vcc_vreg value);
436 
438 int lt8722_get_vcc_vreg(struct lt8722_dev *dev, enum lt8722_vcc_vreg *value);
439 
441 int lt8722_set_sw_vc_int(struct lt8722_dev *dev, enum lt8722_sw_vc_int value);
442 
444 int lt8722_get_sw_vc_int(struct lt8722_dev *dev, enum lt8722_sw_vc_int *value);
445 
447 int lt8722_set_pwr_lim(struct lt8722_dev *dev, enum lt8722_pwr_lim value);
448 
450 int lt8722_get_pwr_lim(struct lt8722_dev *dev, enum lt8722_pwr_lim *value);
451 
453 int lt8722_set_sys_dc(struct lt8722_dev *dev, enum lt8722_sys_dc value);
454 
456 int lt8722_get_sys_dc(struct lt8722_dev *dev, enum lt8722_sys_dc *value);
457 
459 int lt8722_set_spis_dac_ilimn(struct lt8722_dev *dev, uint16_t value);
460 
462 int lt8722_get_spis_dac_ilimn(struct lt8722_dev *dev, uint16_t *value);
463 
465 int lt8722_set_spis_dac_ilimp(struct lt8722_dev *dev, uint16_t value);
466 
468 int lt8722_get_spis_dac_ilimp(struct lt8722_dev *dev, uint16_t *value);
469 
471 int lt8722_set_dac(struct lt8722_dev *dev, uint32_t value);
472 
474 int lt8722_get_dac(struct lt8722_dev *dev, uint32_t *value);
475 
477 int lt8722_set_spis_ov_clamp(struct lt8722_dev *dev, uint8_t value);
478 
480 int lt8722_get_spis_ov_clamp(struct lt8722_dev *dev, uint8_t *value);
481 
483 int lt8722_set_spis_uv_clamp(struct lt8722_dev *dev, uint8_t value);
484 
486 int lt8722_get_spis_uv_clamp(struct lt8722_dev *dev, uint8_t *value);
487 
489 int lt8722_set_aout_en(struct lt8722_dev *dev, bool value);
490 
492 int lt8722_get_aout_en(struct lt8722_dev *dev, bool *value);
493 
495 int lt8722_set_amux(struct lt8722_dev *dev, enum lt8722_amux value,
496  uint8_t test);
497 
499 int lt8722_get_amux(struct lt8722_dev *dev, enum lt8722_amux *value,
500  uint8_t *test);
501 
503 int lt8722_set_output_voltage(struct lt8722_dev *dev, int64_t value);
504 
506 int lt8722_get_output_voltage(struct lt8722_dev *dev, int64_t *value);
507 
509 int lt8722_shutdown(struct lt8722_dev *dev);
510 
512 int lt8722_reset(struct lt8722_dev *dev);
513 
515 int lt8722_set_swen_pin(struct lt8722_dev *dev, uint8_t value);
516 
518 int lt8722_get_swen_pin(struct lt8722_dev *dev, uint8_t *value);
519 
521 int lt8722_set_en_pin(struct lt8722_dev *dev, uint8_t value);
522 
524 int lt8722_get_en_pin(struct lt8722_dev *dev, uint8_t *value);
525 
527 int lt8722_init(struct lt8722_dev **device,
528  struct lt8722_init_param *init_param);
529 
531 int lt8722_remove(struct lt8722_dev *dev);
532 
533 #endif
lt8722_get_pwr_lim
int lt8722_get_pwr_lim(struct lt8722_dev *dev, enum lt8722_pwr_lim *value)
Get LDR power dissipation limit of LT8722 device.
Definition: lt8722.c:537
lt8722_dev
Device descriptor for LT8722.
Definition: lt8722.h:373
LT8722_ENABLE_REQ_MASK
#define LT8722_ENABLE_REQ_MASK
Definition: lt8722.h:107
LT8722_SPIS_UV_CLAMP_MASK
#define LT8722_SPIS_UV_CLAMP_MASK
Definition: lt8722.h:158
LT8722_SPIS_DAC_SIZE
#define LT8722_SPIS_DAC_SIZE
Definition: lt8722.h:81
lt8722_set_en_pin
int lt8722_set_en_pin(struct lt8722_dev *dev, uint8_t value)
Set EN pin of LT8722 device.
Definition: lt8722.c:998
no_os_alloc.h
LT8722_SPIS_OV_CLAMP
#define LT8722_SPIS_OV_CLAMP
Definition: lt8722.h:72
no_os_gpio_init_param
Structure holding the parameters for GPIO initialization.
Definition: no_os_gpio.h:79
lt8722_set_sw_frq_adj
int lt8722_set_sw_frq_adj(struct lt8722_dev *dev, enum lt8722_sw_frq_adj value)
Set switching frequency adjustment of LT8722 device.
Definition: lt8722.c:407
LT8722_AMUX_TEST_MASK
#define LT8722_AMUX_TEST_MASK
Definition: lt8722.h:162
LT8722_SWEN_REQ_DISABLED
@ LT8722_SWEN_REQ_DISABLED
Definition: lt8722.h:187
lt8722_get_sw_vc_int
int lt8722_get_sw_vc_int(struct lt8722_dev *dev, enum lt8722_sw_vc_int *value)
Get initial peak inductor current of LT8722 device.
Definition: lt8722.c:499
LT8722_AOUT_EN_MASK
#define LT8722_AOUT_EN_MASK
Definition: lt8722.h:163
lt8722_packet::data
uint32_t data
Definition: lt8722.h:352
LT8722_ENABLE_REQ_DISABLED
@ LT8722_ENABLE_REQ_DISABLED
Definition: lt8722.h:176
lt8722_set_sw_vc_int
int lt8722_set_sw_vc_int(struct lt8722_dev *dev, enum lt8722_sw_vc_int value)
Set initial peak inductor current of LT8722 device.
Definition: lt8722.c:483
LT8722_SPIS_AMUX_SIZE
#define LT8722_SPIS_AMUX_SIZE
Definition: lt8722.h:84
lt8722_init_param::start_up_sequence
bool start_up_sequence
Definition: lt8722.h:366
lt8722_set_vcc_vreg
int lt8722_set_vcc_vreg(struct lt8722_dev *dev, enum lt8722_vcc_vreg value)
Set internal circuitry voltage source of LT8722 device.
Definition: lt8722.c:445
NO_OS_GENMASK
#define NO_OS_GENMASK(h, l)
Definition: no_os_util.h:82
LT8722_SPIS_DAC_ILIMN_MASK
#define LT8722_SPIS_DAC_ILIMN_MASK
Definition: lt8722.h:138
no_os_spi_write_and_read
int32_t no_os_spi_write_and_read(struct no_os_spi_desc *desc, uint8_t *data, uint16_t bytes_number)
Write and read data to/from SPI.
Definition: no_os_spi.c:159
lt8722_remove
int lt8722_remove(struct lt8722_dev *dev)
Free the resources allocated by the lt8722_init()
Definition: lt8722.c:1148
lt8722_set_enable_req
int lt8722_set_enable_req(struct lt8722_dev *dev, bool value)
Set ENABLE_REQ field in LT8722 device.
Definition: lt8722.c:293
no_os_spi.h
Header file of SPI Interface.
lt8722_get_spis_dac_ilimp
int lt8722_get_spis_dac_ilimp(struct lt8722_dev *dev, uint16_t *value)
Get positive output current limit of LT8722 device.
Definition: lt8722.c:663
LT8722_SYS_DC_MASK
#define LT8722_SYS_DC_MASK
Definition: lt8722.h:111
lt8722_reg_write
int lt8722_reg_write(struct lt8722_dev *dev, uint8_t address, uint32_t data)
Write data to LT8722 device.
Definition: lt8722.c:191
lt8722_get_sys_dc
int lt8722_get_sys_dc(struct lt8722_dev *dev, enum lt8722_sys_dc *value)
Get PWM duty cycle of LT8722 device.
Definition: lt8722.c:575
lt8722_get_aout_en
int lt8722_get_aout_en(struct lt8722_dev *dev, bool *value)
Get analog output buffer status of LT8722 device.
Definition: lt8722.c:815
lt8722_get_sw_frq_adj
int lt8722_get_sw_frq_adj(struct lt8722_dev *dev, enum lt8722_sw_frq_adj *value)
Get switching frequency adjustment of LT8722 device.
Definition: lt8722.c:422
lt8722_reg_read
int lt8722_reg_read(struct lt8722_dev *dev, uint8_t address, uint32_t *data)
Read data from LT8722 device.
Definition: lt8722.c:160
LT8722_SPIS_DAC_ILIMP_DEFAULT_VALUE
#define LT8722_SPIS_DAC_ILIMP_DEFAULT_VALUE
Definition: lt8722.h:100
no_os_units.h
Header file of Units.
lt8722_get_spis_ov_clamp
int lt8722_get_spis_ov_clamp(struct lt8722_dev *dev, uint8_t *value)
Get positive output voltage limit of LT8722 device.
Definition: lt8722.c:739
lt8722_set_spis_dac_ilimn
int lt8722_set_spis_dac_ilimn(struct lt8722_dev *dev, uint16_t value)
Set negative output current limit of LT8722 device.
Definition: lt8722.c:598
LT8722_DATA_READ_COMMAND_SIZE
#define LT8722_DATA_READ_COMMAND_SIZE
Definition: lt8722.h:57
no_os_gpio_get_value
int32_t no_os_gpio_get_value(struct no_os_gpio_desc *desc, uint8_t *value)
Get the value of the specified GPIO.
Definition: no_os_gpio.c:221
lt8722_packet::reg
struct lt8722_reg reg
Definition: lt8722.h:351
pr_err
#define pr_err(fmt, args...)
Definition: no_os_print_log.h:88
lt8722_reg_write_mask
int lt8722_reg_write_mask(struct lt8722_dev *dev, uint8_t address, uint32_t mask, uint32_t data)
Write to LT8722 device register with mask.
Definition: lt8722.c:217
no_os_delay.h
Header file of Delay functions.
LT8722_STATUS_ACQUISITION_COMMAND_SIZE
#define LT8722_STATUS_ACQUISITION_COMMAND_SIZE
Definition: lt8722.h:55
lt8722_init_param::spi
struct no_os_spi_init_param * spi
Definition: lt8722.h:363
LT8722_DATA_READ_COMMAND
#define LT8722_DATA_READ_COMMAND
Definition: lt8722.h:52
lt8722_packet::status
uint16_t status
Definition: lt8722.h:355
lt8722_get_spis_dac_ilimn
int lt8722_get_spis_dac_ilimn(struct lt8722_dev *dev, uint16_t *value)
Get negative output current limit of LT8722 device.
Definition: lt8722.c:619
lt8722_regs
struct lt8722_reg lt8722_regs[LT8722_NUM_REGISTERS]
Definition: lt8722.c:45
lt8722_set_pwr_lim
int lt8722_set_pwr_lim(struct lt8722_dev *dev, enum lt8722_pwr_lim value)
Set LDR power dissipation limit of LT8722 device.
Definition: lt8722.c:522
lt8722_init
int lt8722_init(struct lt8722_dev **device, struct lt8722_init_param *init_param)
Initialize the LT8722 device.
Definition: lt8722.c:1027
LT8722_SW_FRQ_SET_3MHZ
@ LT8722_SW_FRQ_SET_3MHZ
Definition: lt8722.h:208
LT8722_SPIS_DAC_ILIMN_SIZE
#define LT8722_SPIS_DAC_ILIMN_SIZE
Definition: lt8722.h:79
device
Definition: ad9361_util.h:69
NO_OS_GPIO_HIGH
@ NO_OS_GPIO_HIGH
Definition: no_os_gpio.h:117
lt8722_voltage_to_dac
int32_t lt8722_voltage_to_dac(int64_t voltage)
Convert voltage to DAC code.
Definition: lt8722.c:85
no_os_print_log.h
Print messages helpers.
LT8722_SPIS_DAC_ILIMN
#define LT8722_SPIS_DAC_ILIMN
Definition: lt8722.h:69
lt8722_sw_vc_int
lt8722_sw_vc_int
Typical peak inductor current after BST-SW refresh period control bits.
Definition: lt8722.h:245
LT8722_SPIS_OV_CLAMP_MASK
#define LT8722_SPIS_OV_CLAMP_MASK
Definition: lt8722.h:155
LT8722_SPI_RST_RESET
#define LT8722_SPI_RST_RESET
Definition: lt8722.h:119
LT8722_SW_VC_INT_1_278A
@ LT8722_SW_VC_INT_1_278A
Definition: lt8722.h:253
LT8722_AOUT_EN_ENABLED
@ LT8722_AOUT_EN_ENABLED
Definition: lt8722.h:323
LT8722_AOUT_EN_DISABLED
@ LT8722_AOUT_EN_DISABLED
Definition: lt8722.h:321
lt8722_clear_faults
int lt8722_clear_faults(struct lt8722_dev *dev)
Clear LT8722 device faults.
Definition: lt8722.c:271
lt8722_get_status
int lt8722_get_status(struct lt8722_dev *dev, uint16_t *status)
Get LT8722 device status.
Definition: lt8722.c:242
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
LT8722_SPIS_STATUS_SIZE
#define LT8722_SPIS_STATUS_SIZE
Definition: lt8722.h:78
LT8722_SW_FRQ_ADJ_0_PERCENT
@ LT8722_SW_FRQ_ADJ_0_PERCENT
Definition: lt8722.h:221
lt8722_set_sw_vc_int
int lt8722_set_sw_vc_int(struct lt8722_dev *dev, enum lt8722_sw_vc_int value)
Set initial peak inductor current of LT8722 device.
Definition: lt8722.c:483
lt8722_init_param::gpio_en
struct no_os_gpio_init_param * gpio_en
Definition: lt8722.h:365
LT8722_SW_FRQ_SET_2MHZ
@ LT8722_SW_FRQ_SET_2MHZ
Definition: lt8722.h:204
lt8722_set_spis_ov_clamp
int lt8722_set_spis_ov_clamp(struct lt8722_dev *dev, uint8_t value)
Set positive output voltage limit of LT8722 device.
Definition: lt8722.c:724
LT8722_AMUX_IOUT
@ LT8722_AMUX_IOUT
Definition: lt8722.h:301
lt8722_reg::size
uint8_t size
Definition: lt8722.h:333
lt8722_get_en_pin
int lt8722_get_en_pin(struct lt8722_dev *dev, uint8_t *value)
Get EN pin of LT8722 device.
Definition: lt8722.c:1012
lt8722_sw_frq_adj
lt8722_sw_frq_adj
PWM switch frequency adjustment bits.
Definition: lt8722.h:219
lt8722_transaction
int lt8722_transaction(struct lt8722_dev *dev, struct lt8722_packet *packet)
LT8722 device SPI transaction.
Definition: lt8722.c:108
LT8722_PWR_LIM_3_5W
@ LT8722_PWR_LIM_3_5W
Definition: lt8722.h:276
LT8722_AMUX_VDDIO
@ LT8722_AMUX_VDDIO
Definition: lt8722.h:308
lt8722_set_dac
int lt8722_set_dac(struct lt8722_dev *dev, uint32_t value)
Set DAC code of LT8722 device.
Definition: lt8722.c:686
NO_OS_GPIO_LOW
@ NO_OS_GPIO_LOW
Definition: no_os_gpio.h:115
LT8722_SPIS_DAC_ILIMP_SIZE
#define LT8722_SPIS_DAC_ILIMP_SIZE
Definition: lt8722.h:80
LT8722_AMUX_VCC
@ LT8722_AMUX_VCC
Definition: lt8722.h:307
lt8722_get_sw_frq_set
int lt8722_get_sw_frq_set(struct lt8722_dev *dev, enum lt8722_sw_frq_set *value)
Get switching frequency of LT8722 device.
Definition: lt8722.c:384
LT8722_SW_FRQ_SET_1_5MHZ
@ LT8722_SW_FRQ_SET_1_5MHZ
Definition: lt8722.h:202
lt8722_set_enable_req
int lt8722_set_enable_req(struct lt8722_dev *dev, bool value)
Set ENABLE_REQ field in LT8722 device.
Definition: lt8722.c:293
LT8722_ENABLE_REQ_ENABLED
@ LT8722_ENABLE_REQ_ENABLED
Definition: lt8722.h:178
lt8722_shutdown
int lt8722_shutdown(struct lt8722_dev *dev)
Reset the LT8722 device.
Definition: lt8722.c:936
lt8722_init_param
Initialization parameter for the LT8722 device.
Definition: lt8722.h:362
no_os_mdelay
void no_os_mdelay(uint32_t msecs)
Wait until msecs milliseconds passed.
Definition: aducm3029_delay.c:126
no_os_field_prep
uint32_t no_os_field_prep(uint32_t mask, uint32_t val)
LT8722_SYS_DC_20_80_DUTY_CYCLE
@ LT8722_SYS_DC_20_80_DUTY_CYCLE
Definition: lt8722.h:285
LT8722_SPIS_DAC_ILIMP
#define LT8722_SPIS_DAC_ILIMP
Definition: lt8722.h:70
LT8722_SPIS_DAC_ILIMP_MASK
#define LT8722_SPIS_DAC_ILIMP_MASK
Definition: lt8722.h:145
lt8722_get_spis_uv_clamp
int lt8722_get_spis_uv_clamp(struct lt8722_dev *dev, uint8_t *value)
Get negative output voltage limit of LT8722 device.
Definition: lt8722.c:777
lt8722_get_sys_dc
int lt8722_get_sys_dc(struct lt8722_dev *dev, enum lt8722_sys_dc *value)
Get PWM duty cycle of LT8722 device.
Definition: lt8722.c:575
lt8722_get_aout_en
int lt8722_get_aout_en(struct lt8722_dev *dev, bool *value)
Get analog output buffer status of LT8722 device.
Definition: lt8722.c:815
lt8722_get_sw_frq_adj
int lt8722_get_sw_frq_adj(struct lt8722_dev *dev, enum lt8722_sw_frq_adj *value)
Get switching frequency adjustment of LT8722 device.
Definition: lt8722.c:422
lt8722_command::size
uint8_t size
Definition: lt8722.h:342
lt8722_dac_to_voltage
int64_t lt8722_dac_to_voltage(int32_t dac)
Convert DAC code to nanovolts.
Definition: lt8722.c:96
no_os_error.h
Error codes definition.
lt8722_swen_req
lt8722_swen_req
PWM switch enable request bit.
Definition: lt8722.h:185
lt8722_set_spis_dac_ilimn
int lt8722_set_spis_dac_ilimn(struct lt8722_dev *dev, uint16_t value)
Set negative output current limit of LT8722 device.
Definition: lt8722.c:598
lt8722_aout_en
lt8722_aout_en
Analog output buffer enable control bits.
Definition: lt8722.h:319
lt8722_dev::status
uint16_t status
Definition: lt8722.h:378
LT8722_SW_VC_INT_2_646A
@ LT8722_SW_VC_INT_2_646A
Definition: lt8722.h:261
LT8722_SPIS_UV_CLAMP
#define LT8722_SPIS_UV_CLAMP
Definition: lt8722.h:73
LT8722_VCC_VREG_MASK
#define LT8722_VCC_VREG_MASK
Definition: lt8722.h:112
LT8722_AMUX_VSFB
@ LT8722_AMUX_VSFB
Definition: lt8722.h:309
lt8722_set_sys_dc
int lt8722_set_sys_dc(struct lt8722_dev *dev, enum lt8722_sys_dc value)
Set PWM duty cycle of LT8722 device.
Definition: lt8722.c:560
LT8722_PWR_LIM_2W
@ LT8722_PWR_LIM_2W
Definition: lt8722.h:270
LT8722_SPIS_UV_CLAMP_SIZE
#define LT8722_SPIS_UV_CLAMP_SIZE
Definition: lt8722.h:83
LT8722_DAC_RESOLUTION
#define LT8722_DAC_RESOLUTION
Definition: lt8722.h:165
lt8722_get_swen_req
int lt8722_get_swen_req(struct lt8722_dev *dev, bool *value)
Get switching enable of LT8722 device.
Definition: lt8722.c:346
no_os_crc8_populate_msb
void no_os_crc8_populate_msb(uint8_t *table, const uint8_t polynomial)
lt8722_reset
int lt8722_reset(struct lt8722_dev *dev)
Shutdown the LT8722 device.
Definition: lt8722.c:955
lt8722_get_spis_dac_ilimn
int lt8722_get_spis_dac_ilimn(struct lt8722_dev *dev, uint16_t *value)
Get negative output current limit of LT8722 device.
Definition: lt8722.c:619
LT8722_SPIS_DAC_ILIMN_MIN
#define LT8722_SPIS_DAC_ILIMN_MIN
Definition: lt8722.h:141
LT8722_SWEN_REQ_ENABLED
@ LT8722_SWEN_REQ_ENABLED
Definition: lt8722.h:189
lt8722_set_sw_frq_adj
int lt8722_set_sw_frq_adj(struct lt8722_dev *dev, enum lt8722_sw_frq_adj value)
Set switching frequency adjustment of LT8722 device.
Definition: lt8722.c:407
lt8722.h
Header file for the LT8722 Driver.
lt8722_set_spis_dac_ilimp
int lt8722_set_spis_dac_ilimp(struct lt8722_dev *dev, uint16_t value)
Set positive output current limit of LT8722 device.
Definition: lt8722.c:642
no_os_put_unaligned_be32
void no_os_put_unaligned_be32(uint32_t val, uint8_t *buf)
LT8722_SW_VC_INT_0_936A
@ LT8722_SW_VC_INT_0_936A
Definition: lt8722.h:251
lt8722_get_sw_vc_int
int lt8722_get_sw_vc_int(struct lt8722_dev *dev, enum lt8722_sw_vc_int *value)
Get initial peak inductor current of LT8722 device.
Definition: lt8722.c:499
lt8722_get_swen_pin
int lt8722_get_swen_pin(struct lt8722_dev *dev, uint8_t *value)
Get SWEN pin of LT8722 device.
Definition: lt8722.c:984
LT8722_SW_FRQ_SET_2_5MHZ
@ LT8722_SW_FRQ_SET_2_5MHZ
Definition: lt8722.h:206
LT8722_AMUX_VDAC
@ LT8722_AMUX_VDAC
Definition: lt8722.h:299
lt8722_get_dac
int lt8722_get_dac(struct lt8722_dev *dev, uint32_t *value)
Get DAC code of LT8722 device.
Definition: lt8722.c:701
LT8722_PWR_LIM_NO_LIMIT
@ LT8722_PWR_LIM_NO_LIMIT
Definition: lt8722.h:272
LT8722_SPIS_STATUS
#define LT8722_SPIS_STATUS
Definition: lt8722.h:68
LT8722_SW_FRQ_ADJ_0_PERCENT_2
@ LT8722_SW_FRQ_ADJ_0_PERCENT_2
Definition: lt8722.h:227
lt8722_set_swen_pin
int lt8722_set_swen_pin(struct lt8722_dev *dev, uint8_t value)
Set SWEN pin of LT8722 device.
Definition: lt8722.c:970
LT8722_AMUX_V1P65
@ LT8722_AMUX_V1P65
Definition: lt8722.h:304
lt8722_set_sw_frq_set
int lt8722_set_sw_frq_set(struct lt8722_dev *dev, enum lt8722_sw_frq_set value)
Set switching frequency of LT8722 device.
Definition: lt8722.c:369
LT8722_PWR_LIM_MASK
#define LT8722_PWR_LIM_MASK
Definition: lt8722.h:116
lt8722_set_amux
int lt8722_set_amux(struct lt8722_dev *dev, enum lt8722_amux value, uint8_t test)
Set analot output signal source of LT8722 device.
Definition: lt8722.c:839
LT8722_VCC_VREG_3_4V
@ LT8722_VCC_VREG_3_4V
Definition: lt8722.h:238
lt8722_get_status
int lt8722_get_status(struct lt8722_dev *dev, uint16_t *status)
Get LT8722 device status.
Definition: lt8722.c:242
lt8722_packet::ack
uint8_t ack
Definition: lt8722.h:354
lt8722_sys_dc
lt8722_sys_dc
PWM duty cycle control bits.
Definition: lt8722.h:283
lt8722_remove
int lt8722_remove(struct lt8722_dev *dev)
Free the resources allocated by the lt8722_init()
Definition: lt8722.c:1148
LT8722_AMUX_VIN
@ LT8722_AMUX_VIN
Definition: lt8722.h:306
lt8722_get_vcc_vreg
int lt8722_get_vcc_vreg(struct lt8722_dev *dev, enum lt8722_vcc_vreg *value)
Get internal circuitry voltage source of LT8722 device.
Definition: lt8722.c:460
LT8722_SW_VC_INT_MASK
#define LT8722_SW_VC_INT_MASK
Definition: lt8722.h:113
LT8722_SYS_DC_10_90_DUTY_CYCLE
@ LT8722_SYS_DC_10_90_DUTY_CYCLE
Definition: lt8722.h:289
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
lt8722_set_swen_req
int lt8722_set_swen_req(struct lt8722_dev *dev, bool value)
Set switching enable of LT8722 device.
Definition: lt8722.c:331
no_os_spi_desc
Structure holding SPI descriptor.
Definition: no_os_spi.h:192
lt8722_get_sw_frq_set
int lt8722_get_sw_frq_set(struct lt8722_dev *dev, enum lt8722_sw_frq_set *value)
Get switching frequency of LT8722 device.
Definition: lt8722.c:384
lt8722_get_enable_req
int lt8722_get_enable_req(struct lt8722_dev *dev, bool *value)
Get ENABLE_REQ field in LT8722 device.
Definition: lt8722.c:308
lt8722_get_amux
int lt8722_get_amux(struct lt8722_dev *dev, enum lt8722_amux *value, uint8_t *test)
Get analot output signal source of LT8722 device.
Definition: lt8722.c:867
LT8722_DATA_WRITE_COMMAND_SIZE
#define LT8722_DATA_WRITE_COMMAND_SIZE
Definition: lt8722.h:56
LT8722_SPIS_DAC_ILIMP_MIN
#define LT8722_SPIS_DAC_ILIMP_MIN
Definition: lt8722.h:148
lt8722_sw_frq_set
lt8722_sw_frq_set
PWM switch frequency control bits.
Definition: lt8722.h:196
LT8722_SPIS_OV_CLAMP_DEFAULT_VALUE
#define LT8722_SPIS_OV_CLAMP_DEFAULT_VALUE
Definition: lt8722.h:102
NO_OS_DECLARE_CRC8_TABLE
NO_OS_DECLARE_CRC8_TABLE(lt8722_crc8)
LT8722_SPIS_COMMAND
#define LT8722_SPIS_COMMAND
Definition: lt8722.h:67
lt8722_dev::spi
struct no_os_spi_desc * spi
Definition: lt8722.h:374
no_os_gpio_desc
Structure holding the GPIO descriptor.
Definition: no_os_gpio.h:96
lt8722_command::byte
uint8_t byte
Definition: lt8722.h:341
lt8722_set_spis_uv_clamp
int lt8722_set_spis_uv_clamp(struct lt8722_dev *dev, uint8_t value)
Set negative output voltage limit of LT8722 device.
Definition: lt8722.c:762
lt8722_get_spis_uv_clamp
int lt8722_get_spis_uv_clamp(struct lt8722_dev *dev, uint8_t *value)
Get negative output voltage limit of LT8722 device.
Definition: lt8722.c:777
lt8722_get_output_voltage
int lt8722_get_output_voltage(struct lt8722_dev *dev, int64_t *value)
Get output volatge of LT8722 device.
Definition: lt8722.c:912
lt8722_dac_to_voltage
int64_t lt8722_dac_to_voltage(int32_t dac)
Convert DAC code to nanovolts.
Definition: lt8722.c:96
LT8722_AMUX_VTEMP
@ LT8722_AMUX_VTEMP
Definition: lt8722.h:305
lt8722_set_en_pin
int lt8722_set_en_pin(struct lt8722_dev *dev, uint8_t value)
Set EN pin of LT8722 device.
Definition: lt8722.c:998
LT8722_SPIS_COMMAND_SIZE
#define LT8722_SPIS_COMMAND_SIZE
Definition: lt8722.h:77
LT8722_STATUS_ACQUISITION_COMMAND
#define LT8722_STATUS_ACQUISITION_COMMAND
Definition: lt8722.h:50
LT8722_AMUX_VILIMP
@ LT8722_AMUX_VILIMP
Definition: lt8722.h:297
lt8722_dev::start_up_sequence
bool start_up_sequence
Definition: lt8722.h:377
LT8722_SPIS_DAC_ILIMN_DEFAULT_VALUE
#define LT8722_SPIS_DAC_ILIMN_DEFAULT_VALUE
Definition: lt8722.h:99
LT8722_SPIS_AMUX_DEFAULT_VALUE
#define LT8722_SPIS_AMUX_DEFAULT_VALUE
Definition: lt8722.h:104
LT8722_SW_FRQ_SET_3MHZ_2
@ LT8722_SW_FRQ_SET_3MHZ_2
Definition: lt8722.h:210
lt8722_set_output_voltage
int lt8722_set_output_voltage(struct lt8722_dev *dev, int64_t value)
Set output volatge of LT8722 device.
Definition: lt8722.c:892
lt8722_reg
LT8722 register structure.
Definition: lt8722.h:330
LT8722_FAULTS_MASK
#define LT8722_FAULTS_MASK
Definition: lt8722.h:135
lt8722_get_swen_req
int lt8722_get_swen_req(struct lt8722_dev *dev, bool *value)
Get switching enable of LT8722 device.
Definition: lt8722.c:346
LT8722_SPI_RST_MASK
#define LT8722_SPI_RST_MASK
Definition: lt8722.h:114
lt8722_voltage_to_dac
int32_t lt8722_voltage_to_dac(int64_t voltage)
Convert voltage to DAC code.
Definition: lt8722.c:85
lt8722_init_param::gpio_swen
struct no_os_gpio_init_param * gpio_swen
Definition: lt8722.h:364
lt8722_reset
int lt8722_reset(struct lt8722_dev *dev)
Shutdown the LT8722 device.
Definition: lt8722.c:955
LT8722_SW_VC_INT_1_962A
@ LT8722_SW_VC_INT_1_962A
Definition: lt8722.h:257
lt8722_reg::address
uint8_t address
Definition: lt8722.h:331
lt8722_set_spis_dac_ilimp
int lt8722_set_spis_dac_ilimp(struct lt8722_dev *dev, uint16_t value)
Set positive output current limit of LT8722 device.
Definition: lt8722.c:642
no_os_field_get
uint32_t no_os_field_get(uint32_t mask, uint32_t word)
LT8722_SPIS_DAC_ILIMN_MAX
#define LT8722_SPIS_DAC_ILIMN_MAX
Definition: lt8722.h:142
lt8722_clear_faults
int lt8722_clear_faults(struct lt8722_dev *dev)
Clear LT8722 device faults.
Definition: lt8722.c:271
LT8722_SW_VC_INT_0_594A
@ LT8722_SW_VC_INT_0_594A
Definition: lt8722.h:249
LT8722_SPIS_STATUS_DEFAULT_VALUE
#define LT8722_SPIS_STATUS_DEFAULT_VALUE
Definition: lt8722.h:98
LT8722_SPIS_UV_CLAMP_DEFAULT_VALUE
#define LT8722_SPIS_UV_CLAMP_DEFAULT_VALUE
Definition: lt8722.h:103
lt8722_get_dac
int lt8722_get_dac(struct lt8722_dev *dev, uint32_t *value)
Get DAC code of LT8722 device.
Definition: lt8722.c:701
LT8722_AMUX_VSFB_2
@ LT8722_AMUX_VSFB_2
Definition: lt8722.h:310
lt8722_pwr_lim
lt8722_pwr_lim
Linear power stage MOSFET power limit control bits.
Definition: lt8722.h:268
no_os_crc8
uint8_t no_os_crc8(const uint8_t *table, const uint8_t *pdata, size_t nbytes, uint8_t crc)
LT8722_AMUX_VSFB_3
@ LT8722_AMUX_VSFB_3
Definition: lt8722.h:311
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
LT8722_SPIS_DAC_DEFAULT_VALUE
#define LT8722_SPIS_DAC_DEFAULT_VALUE
Definition: lt8722.h:101
lt8722_set_swen_pin
int lt8722_set_swen_pin(struct lt8722_dev *dev, uint8_t value)
Set SWEN pin of LT8722 device.
Definition: lt8722.c:970
lt8722_set_aout_en
int lt8722_set_aout_en(struct lt8722_dev *dev, bool value)
Set analog output buffer status of LT8722 device.
Definition: lt8722.c:800
LT8722_AMUX_VILIMN
@ LT8722_AMUX_VILIMN
Definition: lt8722.h:298
lt8722_set_sw_frq_set
int lt8722_set_sw_frq_set(struct lt8722_dev *dev, enum lt8722_sw_frq_set value)
Set switching frequency of LT8722 device.
Definition: lt8722.c:369
lt8722_get_spis_dac_ilimp
int lt8722_get_spis_dac_ilimp(struct lt8722_dev *dev, uint16_t *value)
Get positive output current limit of LT8722 device.
Definition: lt8722.c:663
LT8722_NUM_REGISTERS
#define LT8722_NUM_REGISTERS
Definition: lt8722.h:47
lt8722_reg_write
int lt8722_reg_write(struct lt8722_dev *dev, uint8_t address, uint32_t data)
Write data to LT8722 device.
Definition: lt8722.c:191
LT8722_SW_VC_INT_2_304A
@ LT8722_SW_VC_INT_2_304A
Definition: lt8722.h:259
lt8722_amux
lt8722_amux
Analog multiplexer control bits.
Definition: lt8722.h:296
LT8722_SW_FRQ_SET_0_5MHZ
@ LT8722_SW_FRQ_SET_0_5MHZ
Definition: lt8722.h:198
LT8722_SPIS_DAC
#define LT8722_SPIS_DAC
Definition: lt8722.h:71
no_os_udelay
void no_os_udelay(uint32_t usecs)
Wait until usecs microseconds passed.
Definition: aducm3029_delay.c:114
lt8722_reg_read
int lt8722_reg_read(struct lt8722_dev *dev, uint8_t address, uint32_t *data)
Read data from LT8722 device.
Definition: lt8722.c:160
lt8722_get_spis_ov_clamp
int lt8722_get_spis_ov_clamp(struct lt8722_dev *dev, uint8_t *value)
Get positive output voltage limit of LT8722 device.
Definition: lt8722.c:739
LT8722_DAC_VREF
#define LT8722_DAC_VREF
Definition: lt8722.h:167
LT8722_SPIS_DAC_ILIMP_MAX
#define LT8722_SPIS_DAC_ILIMP_MAX
Definition: lt8722.h:149
LT8722_CRC_POLYNOMIAL
#define LT8722_CRC_POLYNOMIAL
Definition: lt8722.h:44
lt8722_reg::default_val
uint32_t default_val
Definition: lt8722.h:332
no_os_gpio_set_value
int32_t no_os_gpio_set_value(struct no_os_gpio_desc *desc, uint8_t value)
Set the value of the specified GPIO.
Definition: no_os_gpio.c:197
no_os_get_unaligned_be32
uint32_t no_os_get_unaligned_be32(uint8_t *buf)
init_param
struct ad7616_init_param init_param
Definition: ad7616_sdz.c:113
lt8722_get_pwr_lim
int lt8722_get_pwr_lim(struct lt8722_dev *dev, enum lt8722_pwr_lim *value)
Get LDR power dissipation limit of LT8722 device.
Definition: lt8722.c:537
lt8722_reg_write_mask
int lt8722_reg_write_mask(struct lt8722_dev *dev, uint8_t address, uint32_t mask, uint32_t data)
Write to LT8722 device register with mask.
Definition: lt8722.c:217
lt8722_set_swen_req
int lt8722_set_swen_req(struct lt8722_dev *dev, bool value)
Set switching enable of LT8722 device.
Definition: lt8722.c:331
lt8722_packet
LT8722 packet structure.
Definition: lt8722.h:349
LT8722_AMUX_MASK
#define LT8722_AMUX_MASK
Definition: lt8722.h:161
lt8722_set_pwr_lim
int lt8722_set_pwr_lim(struct lt8722_dev *dev, enum lt8722_pwr_lim value)
Set LDR power dissipation limit of LT8722 device.
Definition: lt8722.c:522
lt8722_set_sys_dc
int lt8722_set_sys_dc(struct lt8722_dev *dev, enum lt8722_sys_dc value)
Set PWM duty cycle of LT8722 device.
Definition: lt8722.c:560
lt8722_command
LT8722 command structure.
Definition: lt8722.h:340
LT8722_PWR_LIM_3W
@ LT8722_PWR_LIM_3W
Definition: lt8722.h:274
lt8722_set_spis_uv_clamp
int lt8722_set_spis_uv_clamp(struct lt8722_dev *dev, uint8_t value)
Set negative output voltage limit of LT8722 device.
Definition: lt8722.c:762
LT8722_SYS_DC_15_85_DUTY_CYCLE
@ LT8722_SYS_DC_15_85_DUTY_CYCLE
Definition: lt8722.h:287
no_os_spi_remove
int32_t no_os_spi_remove(struct no_os_spi_desc *desc)
Free the resources allocated by no_os_spi_init().
Definition: no_os_spi.c:116
lt8722_get_output_voltage
int lt8722_get_output_voltage(struct lt8722_dev *dev, int64_t *value)
Get output volatge of LT8722 device.
Definition: lt8722.c:912
no_os_gpio.h
Header file of GPIO Interface.
LT8722_SPIS_OV_CLAMP_SIZE
#define LT8722_SPIS_OV_CLAMP_SIZE
Definition: lt8722.h:82
LT8722_ACK_ACKNOWLEDGE
#define LT8722_ACK_ACKNOWLEDGE
Definition: lt8722.h:60
LT8722_SW_FRQ_ADJ_NEGATIVE_15_PERCENT
@ LT8722_SW_FRQ_ADJ_NEGATIVE_15_PERCENT
Definition: lt8722.h:225
LT8722_SPIS_DAC_MASK
#define LT8722_SPIS_DAC_MASK
Definition: lt8722.h:152
lt8722_set_vcc_vreg
int lt8722_set_vcc_vreg(struct lt8722_dev *dev, enum lt8722_vcc_vreg value)
Set internal circuitry voltage source of LT8722 device.
Definition: lt8722.c:445
LT8722_AMUX_V1P25
@ LT8722_AMUX_V1P25
Definition: lt8722.h:303
LT8722_SWEN_REQ_MASK
#define LT8722_SWEN_REQ_MASK
Definition: lt8722.h:108
lt8722_dev::gpio_en
struct no_os_gpio_desc * gpio_en
Definition: lt8722.h:376
lt8722_set_output_voltage
int lt8722_set_output_voltage(struct lt8722_dev *dev, int64_t value)
Set output volatge of LT8722 device.
Definition: lt8722.c:892
lt8722_get_swen_pin
int lt8722_get_swen_pin(struct lt8722_dev *dev, uint8_t *value)
Get SWEN pin of LT8722 device.
Definition: lt8722.c:984
no_os_spi_init
int32_t no_os_spi_init(struct no_os_spi_desc **desc, const struct no_os_spi_init_param *param)
Initialize the SPI communication peripheral.
Definition: no_os_spi.c:52
no_os_get_unaligned_be16
uint16_t no_os_get_unaligned_be16(uint8_t *buf)
LT8722_VCC_VREG_3_1V
@ LT8722_VCC_VREG_3_1V
Definition: lt8722.h:236
LT8722_SW_FRQ_SET_1MHZ
@ LT8722_SW_FRQ_SET_1MHZ
Definition: lt8722.h:200
LT8722_SW_FRQ_SET_MASK
#define LT8722_SW_FRQ_SET_MASK
Definition: lt8722.h:109
LT8722_AMUX_VOUT
@ LT8722_AMUX_VOUT
Definition: lt8722.h:300
no_os_util.h
Header file of utility functions.
lt8722_dev::gpio_swen
struct no_os_gpio_desc * gpio_swen
Definition: lt8722.h:375
lt8722_set_amux
int lt8722_set_amux(struct lt8722_dev *dev, enum lt8722_amux value, uint8_t test)
Set analot output signal source of LT8722 device.
Definition: lt8722.c:839
lt8722_set_spis_ov_clamp
int lt8722_set_spis_ov_clamp(struct lt8722_dev *dev, uint8_t value)
Set positive output voltage limit of LT8722 device.
Definition: lt8722.c:724
lt8722_get_en_pin
int lt8722_get_en_pin(struct lt8722_dev *dev, uint8_t *value)
Get EN pin of LT8722 device.
Definition: lt8722.c:1012
lt8722_transaction
int lt8722_transaction(struct lt8722_dev *dev, struct lt8722_packet *packet)
LT8722 device SPI transaction.
Definition: lt8722.c:108
lt8722_set_dac
int lt8722_set_dac(struct lt8722_dev *dev, uint32_t value)
Set DAC code of LT8722 device.
Definition: lt8722.c:686
LT8722_SW_FRQ_ADJ_MASK
#define LT8722_SW_FRQ_ADJ_MASK
Definition: lt8722.h:110
LT8722_SW_FRQ_SET_3MHZ_3
@ LT8722_SW_FRQ_SET_3MHZ_3
Definition: lt8722.h:212
LT8722_SPIS_COMMAND_DEFAULT_VALUE
#define LT8722_SPIS_COMMAND_DEFAULT_VALUE
Definition: lt8722.h:97
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
lt8722_vcc_vreg
lt8722_vcc_vreg
VCC LDO regulation control bits.
Definition: lt8722.h:234
lt8722_get_vcc_vreg
int lt8722_get_vcc_vreg(struct lt8722_dev *dev, enum lt8722_vcc_vreg *value)
Get internal circuitry voltage source of LT8722 device.
Definition: lt8722.c:460
lt8722_set_aout_en
int lt8722_set_aout_en(struct lt8722_dev *dev, bool value)
Set analog output buffer status of LT8722 device.
Definition: lt8722.c:800
LT8722_SW_FRQ_ADJ_POSITIVE_15_PERCENT
@ LT8722_SW_FRQ_ADJ_POSITIVE_15_PERCENT
Definition: lt8722.h:223
lt8722_shutdown
int lt8722_shutdown(struct lt8722_dev *dev)
Reset the LT8722 device.
Definition: lt8722.c:936
lt8722_enable_req
lt8722_enable_req
VCC LDO enable bit and linear power stage enable request bit.
Definition: lt8722.h:174
LT8722_SPIS_AMUX
#define LT8722_SPIS_AMUX
Definition: lt8722.h:74
LT8722_AMUX_V2P5
@ LT8722_AMUX_V2P5
Definition: lt8722.h:302
no_os_crc8.h
Header file of CRC-8 computation.
lt8722_packet::command
struct lt8722_command command
Definition: lt8722.h:350
errno.h
Error macro definition for ARM Compiler.
LT8722_DAC_OFFSET
#define LT8722_DAC_OFFSET
Definition: lt8722.h:166
LT8722_SW_VC_INT_1_620A
@ LT8722_SW_VC_INT_1_620A
Definition: lt8722.h:255
lt8722_get_enable_req
int lt8722_get_enable_req(struct lt8722_dev *dev, bool *value)
Get ENABLE_REQ field in LT8722 device.
Definition: lt8722.c:308
lt8722_get_amux
int lt8722_get_amux(struct lt8722_dev *dev, enum lt8722_amux *value, uint8_t *test)
Get analot output signal source of LT8722 device.
Definition: lt8722.c:867
lt8722_regs
struct lt8722_reg lt8722_regs[LT8722_NUM_REGISTERS]
Definition: lt8722.c:45
lt8722_init
int lt8722_init(struct lt8722_dev **device, struct lt8722_init_param *init_param)
Initialize the LT8722 device.
Definition: lt8722.c:1027
lt8722_packet::crc
uint8_t crc
Definition: lt8722.h:353
no_os_spi_init_param
Structure holding the parameters for SPI initialization.
Definition: no_os_spi.h:140
LT8722_AMUX_VSFB_4
@ LT8722_AMUX_VSFB_4
Definition: lt8722.h:312
LT8722_SW_VC_INT_0_252A
@ LT8722_SW_VC_INT_0_252A
Definition: lt8722.h:247
LT8722_DATA_WRITE_COMMAND
#define LT8722_DATA_WRITE_COMMAND
Definition: lt8722.h:51
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