charger6  2.0.0.0
charger6.h
Go to the documentation of this file.
1 /****************************************************************************
2 ** Copyright (C) 2020 MikroElektronika d.o.o.
3 ** Contact: https://www.mikroe.com/contact
4 **
5 ** Permission is hereby granted, free of charge, to any person obtaining a copy
6 ** of this software and associated documentation files (the "Software"), to deal
7 ** in the Software without restriction, including without limitation the rights
8 ** to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 ** copies of the Software, and to permit persons to whom the Software is
10 ** furnished to do so, subject to the following conditions:
11 ** The above copyright notice and this permission notice shall be
12 ** included in all copies or substantial portions of the Software.
13 **
14 ** THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15 ** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
16 ** OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
17 ** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
18 ** DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT
19 ** OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
20 ** USE OR OTHER DEALINGS IN THE SOFTWARE.
21 ****************************************************************************/
22 
28 #ifndef CHARGER6_H
29 #define CHARGER6_H
30 
31 #ifdef __cplusplus
32 extern "C"{
33 #endif
34 
35 #include "mikrosdk_version.h"
36 
37 #ifdef __GNUC__
38 #if mikroSDK_GET_VERSION < 20800ul
39 #include "rcu_delays.h"
40 #else
41 #include "delays.h"
42 #endif
43 #endif
44 
45 #include "drv_digital_out.h"
46 #include "drv_digital_in.h"
47 #include "drv_i2c_master.h"
48 
69 #define CHARGER6_REGISTER_00 0x00
70 #define CHARGER6_REGISTER_01 0x01
71 #define CHARGER6_REGISTER_02 0x02
72 #define CHARGER6_REGISTER_03 0x03
73 #define CHARGER6_REGISTER_04 0x04
74 #define CHARGER6_REGISTER_05 0x05
75 #define CHARGER6_REGISTER_06 0x06
76 #define CHARGER6_REGISTER_07 0x07
77 #define CHARGER6_REGISTER_08 0x08
78 #define CHARGER6_REGISTER_09 0x09
79 #define CHARGER6_REGISTER_0A 0x0A
80 #define CHARGER6_REGISTER_0B 0x0B
81  // charger6_reg
83 
99 #define CHARGER6_PSEL_SW_MANUAL 0x00
100 #define CHARGER6_PSEL_500_mA 0x01
101  // pwr_sel
103 
119 #define CHARGER6_SYS_MIN_VTG_2600mV 2600
120 #define CHARGER6_SYS_MIN_VTG_2800mV 2800
121 #define CHARGER6_SYS_MIN_VTG_3000mV 3000
122 #define CHARGER6_SYS_MIN_VTG_3200mV 3200
123 #define CHARGER6_SYS_MIN_VTG_3400mV 3400
124 #define CHARGER6_SYS_MIN_VTG_3500mV 3500
125 #define CHARGER6_SYS_MIN_VTG_3600mV 3600
126 #define CHARGER6_SYS_MIN_VTG_3700mV 3700
127  // sys_min_voltage
129 
145 #define CHARGER6_TOPOFF_TIMER_DISABLE 0
146 #define CHARGER6_TOPOFF_TIMER_15_MINUTES 15
147 #define CHARGER6_TOPOFF_TIMER_30_MINUTES 30
148 #define CHARGER6_TOPOFF_TIMER_45_MINUTES 45
149  // top_off_time
151 
172 #define CHARGER6_R00_EN_HIZ_DISABLE 0x00
173 #define CHARGER6_R00_EN_HIZ_ENABLE 0x80
174 #define CHARGER6_R00_EN_ICHG_MON_ENABLE 0x00
175 #define CHARGER6_R00_EN_ICHG_MON_DISABLE_STAT 0x60
176 #define CHARGER6_R00_IINDPM_1600mA 0x10
177 #define CHARGER6_R00_IINDPM_800mA 0x08
178 #define CHARGER6_R00_IINDPM_400mA 0x04
179 #define CHARGER6_R00_IINDPM_200mA 0x02
180 #define CHARGER6_R00_IINDPM_100mA 0x01
181 
187 #define CHARGER6_R01_PFM_ENABLE 0x00
188 #define CHARGER6_R01_PFM_DISABLE 0x80
189 #define CHARGER6_R01_WD_RST_NORMAL 0x00
190 #define CHARGER6_R01_WD_RST_RESET 0x40
191 #define CHARGER6_R01_OTG_DISABLE 0x00
192 #define CHARGER6_R01_OTG_ENABLE 0x20
193 #define CHARGER6_R01_CHARGE_DISABLE 0x00
194 #define CHARGER6_R01_CHARGE_ENABLE 0x10
195 #define CHARGER6_R01_SYS_MIN_2600mV 0x00
196 #define CHARGER6_R01_SYS_MIN_2800mV 0x02
197 #define CHARGER6_R01_SYS_MIN_3000mV 0x04
198 #define CHARGER6_R01_SYS_MIN_3200mV 0x06
199 #define CHARGER6_R01_SYS_MIN_3400mV 0x08
200 #define CHARGER6_R01_SYS_MIN_3500mV 0x0A
201 #define CHARGER6_R01_SYS_MIN_3600mV 0x0C
202 #define CHARGER6_R01_SYS_MIN_3700mV 0x0E
203 #define CHARGER6_R01_MIN_VBAT_SEL_2800mV 0x00
204 #define CHARGER6_R01_MIN_VBAT_SEL_2500mV 0x01
205 
211 #define CHARGER6_R02_BOOST_LIM_500mA 0x00
212 #define CHARGER6_R02_BOOST_LIM_1200mA 0x80
213 #define CHARGER6_R02_Q1_FULLON_BETTER_ACCURACY 0x00
214 #define CHARGER6_R02_Q1_FULLON_BETTER_EFFICIENCY 0x40
215 #define CHARGER6_R02_ICHG_1920mA 0x20
216 #define CHARGER6_R02_ICHG_960mA 0x10
217 #define CHARGER6_R02_ICHG_480mA 0x08
218 #define CHARGER6_R02_ICHG_240mA 0x04
219 #define CHARGER6_R02_ICHG_120mA 0x02
220 #define CHARGER6_R02_ICHG_60mA 0x01
221 
227 #define CHARGER6_R03_IPRECHG_480mA 0x80
228 #define CHARGER6_R03_IPRECHG_240mA 0x40
229 #define CHARGER6_R03_IPRECHG_120mA 0x20
230 #define CHARGER6_R03_IPRECHG_60mA 0x10
231 #define CHARGER6_R03_ITERM_480mA 0x08
232 #define CHARGER6_R03_ITERM_240mA 0x04
233 #define CHARGER6_R03_ITERM_120mA 0x02
234 #define CHARGER6_R03_ITERM_60mA 0x01
235 
241 #define CHARGER6_R04_VREG_512mV 0x80
242 #define CHARGER6_R04_VREG_256mV 0x40
243 #define CHARGER6_R04_VREG_128mV 0x20
244 #define CHARGER6_R04_VREG_64mV 0x10
245 #define CHARGER6_R04_VREG_32mV 0x08
246 #define CHARGER6_R04_TOPOFF_TIMER_DISABLED 0x00
247 #define CHARGER6_R04_TOPOFF_TIMER_15_MIN 0x02
248 #define CHARGER6_R04_TOPOFF_TIMER_30_MIN 0x04
249 #define CHARGER6_R04_TOPOFF_TIMER_45_MIN 0x06
250 #define CHARGER6_R04_VRECHG_100mV 0x00
251 #define CHARGER6_R04_VRECHG_200mV 0x01
252 
258 #define CHARGER6_R05_TERMINATION_DISABLE 0x00
259 #define CHARGER6_R05_TERMINATION_ENABLE 0x80
260 #define CHARGER6_R05_WATCHDOG_DISABLE 0x00
261 #define CHARGER6_R05_WATCHDOG_TIMER_40_SEC 0x10
262 #define CHARGER6_R05_WATCHDOG_TIMER_80_SEC 0x20
263 #define CHARGER6_R05_WATCHDOG_TIMER_160_SEC 0x30
264 #define CHARGER6_R05_TIMER_DISABLE 0x00
265 #define CHARGER6_R05_TIMER_ENABLE 0x08
266 #define CHARGER6_R05_CHG_TIMER_5_HOURS 0x00
267 #define CHARGER6_R05_CHG_TIMER_10_HOURS 0x04
268 #define CHARGER6_R05_TREG_90_C 0x00
269 #define CHARGER6_R05_TREG_110_C 0x02
270 #define CHARGER6_R05_JEITA_ISET_50 0x00
271 #define CHARGER6_R05_JEITA_ISET_20 0x01
272 
278 #define CHARGER6_R06_OVP_TSH_5500mV 0x00
279 #define CHARGER6_R06_OVP_TSH_6500mV 0x40
280 #define CHARGER6_R06_OVP_TSH_10500mV 0x80
281 #define CHARGER6_R06_OVP_TSH_14000mV 0xC0
282 #define CHARGER6_R06_BOOSTV_4850mV 0x00
283 #define CHARGER6_R06_BOOSTV_5000mV 0x10
284 #define CHARGER6_R06_BOOSTV_5150mV 0x20
285 #define CHARGER6_R06_BOOSTV_5300mV 0x30
286 #define CHARGER6_R06_VINDPM_800mV 0x08
287 #define CHARGER6_R06_VINDPM_400mV 0x04
288 #define CHARGER6_R06_VINDPM_200mV 0x02
289 #define CHARGER6_R06_VINDPM_100mV 0x01
290 
296 #define CHARGER6_R07_NOT_IN_INPUT_CURRENT_LIMIT 0x00
297 #define CHARGER6_R07_FORCE_INPUT_CURRENT_LIMIT 0x80
298 #define CHARGER6_R07_TMR2X_DISABLE 0x00
299 #define CHARGER6_R07_TMR2X_ENABLE 0x40
300 #define CHARGER6_R07_BATFET_ALLOW_Q4_TURN_ON 0x00
301 #define CHARGER6_R07_BATFET_TURN_OFF_Q4 0x20
302 #define CHARGER6_R07_JEITA_VSET_TO_4100mV 0x00
303 #define CHARGER6_R07_JEITA_VSET_TO_VREG 0x10
304 #define CHARGER6_R07_BATFET_IMMEDIATELY 0x00
305 #define CHARGER6_R07_BATFET_AFTER_10_SEC 0x08
306 #define CHARGER6_R07_BATFET_RST_DISABLE 0x00
307 #define CHARGER6_R07_BATFET_RST_ENABLE 0x04
308 #define CHARGER6_R07_VDPM_BAT_TRACK_DISABLE 0x00
309 #define CHARGER6_R07_VDPM_BAT_TRACK_VBAT_PLUS_200mV 0x01
310 #define CHARGER6_R07_VDPM_BAT_TRACK_VBAT_PLUS_250mV 0x02
311 #define CHARGER6_R07_VDPM_BAT_TRACK_VBAT_PLUS_300mV 0x03
312 
318 #define CHARGER6_R08_VBUS_BIT_MASK 0xE0
319 #define CHARGER6_R08_VBUS_STAT_NO_INPUT 0x00
320 #define CHARGER6_R08_VBUS_STAT_USB_HOST_SDP 0x20
321 #define CHARGER6_R08_VBUS_STAT_ADAPTER_2_4_A 0x40
322 #define CHARGER6_R08_VBUS_OTG 0xE0
323 #define CHARGER6_R08_CHRG_STAT_BIT_MASK 0x18
324 #define CHARGER6_R08_CHRG_STAT_NOT_CHARGING 0x00
325 #define CHARGER6_R08_CHRG_STAT_PRE_CHARGE 0x08
326 #define CHARGER6_R08_CHRG_STAT_FAST_CHARGING 0x10
327 #define CHARGER6_R08_CHRG_STAT_CHARGE_TERMINATION 0x18
328 #define CHARGER6_R08_PG_STAT_BIT_MASK 0x04
329 #define CHARGER6_R08_PG_STAT_POWER_NOT_GOOD 0x00
330 #define CHARGER6_R08_PG_STAT_POWER_GOOD 0x04
331 #define CHARGER6_R08_THERM_STAT_BIT_MASK 0x02
332 #define CHARGER6_R08_THERM_STAT_NOT_mAl 0x00
333 #define CHARGER6_R08_THERM_STAT_mAl 0x02
334 #define CHARGER6_R08_VSYS_BIT_MASK 0x01
335 #define CHARGER6_R08_VSYS_STAT_NOT 0x00
336 #define CHARGER6_R08_VSYS_STAT_VSYSM 0x01
337 
343 #define CHARGER6_R09_WATCHDOG_FAULT_BIT_MASK 0x80
344 #define CHARGER6_R09_WATCHDOG_FAULT_NORMAL 0x00
345 #define CHARGER6_R09_WATCHDOG_FAULT_TIMER_EXPIRATION 0x80
346 #define CHARGER6_R09_BOOST_FAULT_BIT_MASK 0x40
347 #define CHARGER6_R09_BOOST_FAULT_NORMAL 0x00
348 #define CHARGER6_R09_BOOST_FAULT_VBUS_OVERLOADED 0x40
349 #define CHARGER6_R09_CHRG_FAULT_BIT_MASK 0x30
350 #define CHARGER6_R09_CHRG_FAULT_NORMAL 0x00
351 #define CHARGER6_R09_CHRG_FAULT_INPUT_FAULT 0x10
352 #define CHARGER6_R09_CHRG_FAULT_THERMAL_SHUTDOWN 0x20
353 #define CHARGER6_R09_CHRG_FAULT_CHG_SAFETY_TIMER_EXP 0x30
354 #define CHARGER6_R09_BAT_FAULT_BIT_MASK 0x08
355 #define CHARGER6_R09_BAT_FAULT_NORMAL 0x00
356 #define CHARGER6_R09_BAT_FAULT_BATOVP 0x08
357 #define CHARGER6_R09_NTC_FAULT_BIT_MASK 0x07
358 #define CHARGER6_R09_NTC_FAULT_NORMAL 0x00
359 #define CHARGER6_R09_NTC_FAULT_WARM 0x02
360 #define CHARGER6_R09_NTC_FAULT_COOL 0x03
361 #define CHARGER6_R09_NTC_FAULT_COLD 0x05
362 #define CHARGER6_R09_NTC_FAULT_HOT 0x06
363 
369 #define CHARGER6_R0A_VBUS_GD_BIT_MASK 0x80
370 #define CHARGER6_R0A_VBUS_GD_NOT_VBUS 0x00
371 #define CHARGER6_R0A_VBUS_GD_VBUS_ATTACHED 0x80
372 #define CHARGER6_R0A_VBUS_GD_VINDPM_BIT_MASK 0x40
373 #define CHARGER6_R0A_VBUS_GD_NOT_IN_VINDPM 0x00
374 #define CHARGER6_R0A_VBUS_GD_IN_VINDPM 0x40
375 #define CHARGER6_R0A_VBUS_GD_IINDPM_BIT_MASK 0x20
376 #define CHARGER6_R0A_VBUS_GD_NOT_IN_IINDPM 0x00
377 #define CHARGER6_R0A_VBUS_GD_IN_IINDPM 0x20
378 #define CHARGER6_R0A_TOP_OFF_BIT_MASK 0x08
379 #define CHARGER6_R0A_TOP_OFF_TIMER_NOT_COUNTING 0x00
380 #define CHARGER6_R0A_TOP_OFF_TIMER_COUNTING 0x08
381 #define CHARGER6_R0A_ACOV_STAT_BIT_MASK 0x04
382 #define CHARGER6_R0A_ACOV_STAT_NOT_IN_ACOV 0x00
383 #define CHARGER6_R0A_ACOV_STAT_IN_ACOV 0x04
384 #define CHARGER6_R0A_VINDPM_INT_MASK_ALLOW 0x00
385 #define CHARGER6_R0A_VINDPM_INT_MASK_MASK 0x02
386 #define CHARGER6_R0A_IINDPM_INT_MASK_ALLOW 0x00
387 #define CHARGER6_R0A_IINDPM_INT_MASK_MASK 0x01
388 
394 #define CHARGER6_R0B_DEV_ID_BIT_MASK 0x78
395 #define CHARGER6_R0B_DEV_REV_BIT_MASK 0x03
396 
397 
403 #define CHARGER6_SET_DEV_ADDR 0x6B
404  // charger6_set
406 
421 #define CHARGER6_MAP_MIKROBUS( cfg, mikrobus ) \
422  cfg.scl = MIKROBUS( mikrobus, MIKROBUS_SCL ); \
423  cfg.sda = MIKROBUS( mikrobus, MIKROBUS_SDA ); \
424  cfg.ce = MIKROBUS( mikrobus, MIKROBUS_CS ); \
425  cfg.qon = MIKROBUS( mikrobus, MIKROBUS_RST ); \
426  cfg.psel = MIKROBUS( mikrobus, MIKROBUS_PWM ); \
427  cfg.int_pin = MIKROBUS( mikrobus, MIKROBUS_INT )
428  // charger6_map // charger6
431 
436 typedef struct
437 {
438  // Output pins
439 
440  digital_out_t ce;
441  digital_out_t qon;
442  digital_out_t psel;
444  // Input pins
445 
446  digital_in_t int_pin;
448  // Modules
449 
450  i2c_master_t i2c;
452  // I2C slave address
453 
454  uint8_t slave_address;
456 } charger6_t;
457 
462 typedef struct
463 {
464  pin_name_t scl;
465  pin_name_t sda;
467  pin_name_t ce;
468  pin_name_t qon;
469  pin_name_t psel;
470  pin_name_t int_pin;
472  uint32_t i2c_speed;
473  uint8_t i2c_address;
476 
481 typedef struct
482 {
483  uint8_t vbus_stat;
484  uint8_t chrg_stat;
485  uint8_t pg_stat;
486  uint8_t therm_stat;
487  uint8_t vsys_stat;
488  uint8_t watchdog_fault;
489  uint8_t boost_fault;
490  uint8_t chrg_fault;
491  uint8_t bat_fault;
492  uint8_t ntc_fault;
493  uint8_t vbus_gd;
494  uint8_t vindpm_stat;
495  uint8_t iindpm_stat;
496  uint8_t topoff_active;
497  uint8_t acov_stat;
498  uint8_t vindpm_int;
499  uint8_t iindpm_int;
500  uint8_t dev_id;
501  uint8_t dev_rev;
502 }
504 
509 typedef enum
510 {
512  CHARGER6_ERROR = -1
513 
515 
534 
552 
569 
587 err_t charger6_generic_write ( charger6_t *ctx, uint8_t reg, uint8_t *tx_buf, uint8_t tx_len );
588 
606 err_t charger6_generic_read ( charger6_t *ctx, uint8_t reg, uint8_t *rx_buf, uint8_t rx_len );
607 
623 
639 
659 void charger6_power_source_selection ( charger6_t *ctx, uint8_t pwr_sel );
660 
682 err_t charger6_set_input_current_limit ( charger6_t *ctx, uint16_t current_limit );
683 
702 err_t charger6_set_system_minimum_voltage ( charger6_t *ctx, uint16_t sys_min_voltage );
703 
723 
745 err_t charger6_set_fast_charge_current ( charger6_t *ctx, uint16_t fast_chg_current );
746 
763 
782 err_t charger6_set_precharge_current ( charger6_t *ctx, uint16_t precharge_current );
783 
802 err_t charger6_set_termination_current ( charger6_t *ctx, uint16_t termination_current );
803 
822 err_t charger6_set_charge_voltage ( charger6_t *ctx, uint16_t charge_voltage );
823 
846 err_t charger6_set_top_off_timer ( charger6_t *ctx, uint8_t top_off_time );
847 
864 
881 
882 #ifdef __cplusplus
883 }
884 #endif
885 #endif // CHARGER6_H
886  // charger6
888 
889 // ------------------------------------------------------------------------ END
charger6_default_cfg
err_t charger6_default_cfg(charger6_t *ctx)
Charger 6 default configuration function.
charger6_status_t::chrg_fault
uint8_t chrg_fault
Definition: charger6.h:490
charger6_cfg_t
Charger 6 Click configuration object.
Definition: charger6.h:463
charger6_t::ce
digital_out_t ce
Definition: charger6.h:440
charger6_status_t::vindpm_stat
uint8_t vindpm_stat
Definition: charger6.h:494
charger6_status_t
Charger 6 Click data status structure definition.
Definition: charger6.h:482
charger6_get_status
err_t charger6_get_status(charger6_t *ctx, charger6_status_t *chg_status)
Charger 6 get status function.
charger6_status_t::therm_stat
uint8_t therm_stat
Definition: charger6.h:486
charger6_set_termination_current
err_t charger6_set_termination_current(charger6_t *ctx, uint16_t termination_current)
Charger 6 set termination current function.
charger6_status_t::acov_stat
uint8_t acov_stat
Definition: charger6.h:497
charger6_cfg_setup
void charger6_cfg_setup(charger6_cfg_t *cfg)
Charger 6 configuration object setup function.
charger6_t::psel
digital_out_t psel
Definition: charger6.h:442
charger6_status_t::vsys_stat
uint8_t vsys_stat
Definition: charger6.h:487
charger6_t::i2c
i2c_master_t i2c
Definition: charger6.h:450
charger6_cfg_t::i2c_address
uint8_t i2c_address
Definition: charger6.h:473
charger6_status_t::dev_id
uint8_t dev_id
Definition: charger6.h:500
charger6_check_interrupt
uint8_t charger6_check_interrupt(charger6_t *ctx)
Charger 6 check interrupt function.
charger6_power_source_selection
void charger6_power_source_selection(charger6_t *ctx, uint8_t pwr_sel)
Charger 6 power source selection function.
charger6_set_input_current_limit
err_t charger6_set_input_current_limit(charger6_t *ctx, uint16_t current_limit)
Charger 6 set input current limit function.
chg_status
charger6_status_t chg_status
Definition: main.c:36
charger6_status_t::iindpm_int
uint8_t iindpm_int
Definition: charger6.h:499
charger6_status_t::iindpm_stat
uint8_t iindpm_stat
Definition: charger6.h:495
charger6_get_fast_charge_current
uint16_t charger6_get_fast_charge_current(charger6_t *ctx)
Charger 6 get fast charge current function.
charger6_cfg_t::sda
pin_name_t sda
Definition: charger6.h:465
charger6_status_t::boost_fault
uint8_t boost_fault
Definition: charger6.h:489
charger6_hw_reset
void charger6_hw_reset(charger6_t *ctx)
Charger 6 hw reset function.
CHARGER6_ERROR
@ CHARGER6_ERROR
Definition: charger6.h:512
charger6_disable_battery_charging
void charger6_disable_battery_charging(charger6_t *ctx)
Charger 6 charge disable function.
charger6_set_fast_charge_current
err_t charger6_set_fast_charge_current(charger6_t *ctx, uint16_t fast_chg_current)
Charger 6 set fast charge current function.
charger6_cfg_t::qon
pin_name_t qon
Definition: charger6.h:468
charger6_set_precharge_current
err_t charger6_set_precharge_current(charger6_t *ctx, uint16_t precharge_current)
Charger 6 set precharge current function.
charger6_cfg_t::int_pin
pin_name_t int_pin
Definition: charger6.h:470
charger6_t::qon
digital_out_t qon
Definition: charger6.h:441
charger6_status_t::vbus_gd
uint8_t vbus_gd
Definition: charger6.h:493
charger6_enable_battery_charging
void charger6_enable_battery_charging(charger6_t *ctx)
Charger 6 charge enable function.
charger6_status_t::ntc_fault
uint8_t ntc_fault
Definition: charger6.h:492
CHARGER6_OK
@ CHARGER6_OK
Definition: charger6.h:511
charger6_cfg_t::scl
pin_name_t scl
Definition: charger6.h:464
charger6_t
Charger 6 Click context object.
Definition: charger6.h:437
charger6_status_t::chrg_stat
uint8_t chrg_stat
Definition: charger6.h:484
charger6_status_t::bat_fault
uint8_t bat_fault
Definition: charger6.h:491
charger6_status_t::watchdog_fault
uint8_t watchdog_fault
Definition: charger6.h:488
charger6_status_t::dev_rev
uint8_t dev_rev
Definition: charger6.h:501
charger6_status_t::vbus_stat
uint8_t vbus_stat
Definition: charger6.h:483
charger6_set_charge_voltage
err_t charger6_set_charge_voltage(charger6_t *ctx, uint16_t charge_voltage)
Charger 6 set charge voltage function.
charger6_status_t::pg_stat
uint8_t pg_stat
Definition: charger6.h:485
charger6_return_value_t
charger6_return_value_t
Charger 6 Click return value data.
Definition: charger6.h:510
charger6_status_t::topoff_active
uint8_t topoff_active
Definition: charger6.h:496
charger6_set_top_off_timer
err_t charger6_set_top_off_timer(charger6_t *ctx, uint8_t top_off_time)
Charger 6 set top OFF timer function.
charger6_cfg_t::ce
pin_name_t ce
Definition: charger6.h:467
charger6_status_t::vindpm_int
uint8_t vindpm_int
Definition: charger6.h:498
charger6_cfg_t::i2c_speed
uint32_t i2c_speed
Definition: charger6.h:472
charger6_generic_write
err_t charger6_generic_write(charger6_t *ctx, uint8_t reg, uint8_t *tx_buf, uint8_t tx_len)
Charger 6 I2C writing function.
charger6_cfg_t::psel
pin_name_t psel
Definition: charger6.h:469
charger6_set_system_minimum_voltage
err_t charger6_set_system_minimum_voltage(charger6_t *ctx, uint16_t sys_min_voltage)
Charger 6 set system minimum voltage function.
charger6_t::slave_address
uint8_t slave_address
Definition: charger6.h:454
charger6_t::int_pin
digital_in_t int_pin
Definition: charger6.h:446
charger6_init
err_t charger6_init(charger6_t *ctx, charger6_cfg_t *cfg)
Charger 6 initialization function.
charger6_generic_read
err_t charger6_generic_read(charger6_t *ctx, uint8_t reg, uint8_t *rx_buf, uint8_t rx_len)
Charger 6 I2C reading function.