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 
39 #ifdef PREINIT_SUPPORTED
40 #include "preinit.h"
41 #endif
42 
43 #ifdef MikroCCoreVersion
44  #if MikroCCoreVersion >= 1
45  #include "delays.h"
46  #endif
47 #endif
48 
49 #include "drv_digital_out.h"
50 #include "drv_digital_in.h"
51 #include "drv_i2c_master.h"
52 
73 #define CHARGER6_REGISTER_00 0x00
74 #define CHARGER6_REGISTER_01 0x01
75 #define CHARGER6_REGISTER_02 0x02
76 #define CHARGER6_REGISTER_03 0x03
77 #define CHARGER6_REGISTER_04 0x04
78 #define CHARGER6_REGISTER_05 0x05
79 #define CHARGER6_REGISTER_06 0x06
80 #define CHARGER6_REGISTER_07 0x07
81 #define CHARGER6_REGISTER_08 0x08
82 #define CHARGER6_REGISTER_09 0x09
83 #define CHARGER6_REGISTER_0A 0x0A
84 #define CHARGER6_REGISTER_0B 0x0B
85  // charger6_reg
87 
103 #define CHARGER6_PSEL_SW_MANUAL 0x00
104 #define CHARGER6_PSEL_500_mA 0x01
105  // pwr_sel
107 
123 #define CHARGER6_SYS_MIN_VTG_2600mV 2600
124 #define CHARGER6_SYS_MIN_VTG_2800mV 2800
125 #define CHARGER6_SYS_MIN_VTG_3000mV 3000
126 #define CHARGER6_SYS_MIN_VTG_3200mV 3200
127 #define CHARGER6_SYS_MIN_VTG_3400mV 3400
128 #define CHARGER6_SYS_MIN_VTG_3500mV 3500
129 #define CHARGER6_SYS_MIN_VTG_3600mV 3600
130 #define CHARGER6_SYS_MIN_VTG_3700mV 3700
131  // sys_min_voltage
133 
149 #define CHARGER6_TOPOFF_TIMER_DISABLE 0
150 #define CHARGER6_TOPOFF_TIMER_15_MINUTES 15
151 #define CHARGER6_TOPOFF_TIMER_30_MINUTES 30
152 #define CHARGER6_TOPOFF_TIMER_45_MINUTES 45
153  // top_off_time
155 
176 #define CHARGER6_R00_EN_HIZ_DISABLE 0x00
177 #define CHARGER6_R00_EN_HIZ_ENABLE 0x80
178 #define CHARGER6_R00_EN_ICHG_MON_ENABLE 0x00
179 #define CHARGER6_R00_EN_ICHG_MON_DISABLE_STAT 0x60
180 #define CHARGER6_R00_IINDPM_1600mA 0x10
181 #define CHARGER6_R00_IINDPM_800mA 0x08
182 #define CHARGER6_R00_IINDPM_400mA 0x04
183 #define CHARGER6_R00_IINDPM_200mA 0x02
184 #define CHARGER6_R00_IINDPM_100mA 0x01
185 
191 #define CHARGER6_R01_PFM_ENABLE 0x00
192 #define CHARGER6_R01_PFM_DISABLE 0x80
193 #define CHARGER6_R01_WD_RST_NORMAL 0x00
194 #define CHARGER6_R01_WD_RST_RESET 0x40
195 #define CHARGER6_R01_OTG_DISABLE 0x00
196 #define CHARGER6_R01_OTG_ENABLE 0x20
197 #define CHARGER6_R01_CHARGE_DISABLE 0x00
198 #define CHARGER6_R01_CHARGE_ENABLE 0x10
199 #define CHARGER6_R01_SYS_MIN_2600mV 0x00
200 #define CHARGER6_R01_SYS_MIN_2800mV 0x02
201 #define CHARGER6_R01_SYS_MIN_3000mV 0x04
202 #define CHARGER6_R01_SYS_MIN_3200mV 0x06
203 #define CHARGER6_R01_SYS_MIN_3400mV 0x08
204 #define CHARGER6_R01_SYS_MIN_3500mV 0x0A
205 #define CHARGER6_R01_SYS_MIN_3600mV 0x0C
206 #define CHARGER6_R01_SYS_MIN_3700mV 0x0E
207 #define CHARGER6_R01_MIN_VBAT_SEL_2800mV 0x00
208 #define CHARGER6_R01_MIN_VBAT_SEL_2500mV 0x01
209 
215 #define CHARGER6_R02_BOOST_LIM_500mA 0x00
216 #define CHARGER6_R02_BOOST_LIM_1200mA 0x80
217 #define CHARGER6_R02_Q1_FULLON_BETTER_ACCURACY 0x00
218 #define CHARGER6_R02_Q1_FULLON_BETTER_EFFICIENCY 0x40
219 #define CHARGER6_R02_ICHG_1920mA 0x20
220 #define CHARGER6_R02_ICHG_960mA 0x10
221 #define CHARGER6_R02_ICHG_480mA 0x08
222 #define CHARGER6_R02_ICHG_240mA 0x04
223 #define CHARGER6_R02_ICHG_120mA 0x02
224 #define CHARGER6_R02_ICHG_60mA 0x01
225 
231 #define CHARGER6_R03_IPRECHG_480mA 0x80
232 #define CHARGER6_R03_IPRECHG_240mA 0x40
233 #define CHARGER6_R03_IPRECHG_120mA 0x20
234 #define CHARGER6_R03_IPRECHG_60mA 0x10
235 #define CHARGER6_R03_ITERM_480mA 0x08
236 #define CHARGER6_R03_ITERM_240mA 0x04
237 #define CHARGER6_R03_ITERM_120mA 0x02
238 #define CHARGER6_R03_ITERM_60mA 0x01
239 
245 #define CHARGER6_R04_VREG_512mV 0x80
246 #define CHARGER6_R04_VREG_256mV 0x40
247 #define CHARGER6_R04_VREG_128mV 0x20
248 #define CHARGER6_R04_VREG_64mV 0x10
249 #define CHARGER6_R04_VREG_32mV 0x08
250 #define CHARGER6_R04_TOPOFF_TIMER_DISABLED 0x00
251 #define CHARGER6_R04_TOPOFF_TIMER_15_MIN 0x02
252 #define CHARGER6_R04_TOPOFF_TIMER_30_MIN 0x04
253 #define CHARGER6_R04_TOPOFF_TIMER_45_MIN 0x06
254 #define CHARGER6_R04_VRECHG_100mV 0x00
255 #define CHARGER6_R04_VRECHG_200mV 0x01
256 
262 #define CHARGER6_R05_TERMINATION_DISABLE 0x00
263 #define CHARGER6_R05_TERMINATION_ENABLE 0x80
264 #define CHARGER6_R05_WATCHDOG_DISABLE 0x00
265 #define CHARGER6_R05_WATCHDOG_TIMER_40_SEC 0x10
266 #define CHARGER6_R05_WATCHDOG_TIMER_80_SEC 0x20
267 #define CHARGER6_R05_WATCHDOG_TIMER_160_SEC 0x30
268 #define CHARGER6_R05_TIMER_DISABLE 0x00
269 #define CHARGER6_R05_TIMER_ENABLE 0x08
270 #define CHARGER6_R05_CHG_TIMER_5_HOURS 0x00
271 #define CHARGER6_R05_CHG_TIMER_10_HOURS 0x04
272 #define CHARGER6_R05_TREG_90_C 0x00
273 #define CHARGER6_R05_TREG_110_C 0x02
274 #define CHARGER6_R05_JEITA_ISET_50 0x00
275 #define CHARGER6_R05_JEITA_ISET_20 0x01
276 
282 #define CHARGER6_R06_OVP_TSH_5500mV 0x00
283 #define CHARGER6_R06_OVP_TSH_6500mV 0x40
284 #define CHARGER6_R06_OVP_TSH_10500mV 0x80
285 #define CHARGER6_R06_OVP_TSH_14000mV 0xC0
286 #define CHARGER6_R06_BOOSTV_4850mV 0x00
287 #define CHARGER6_R06_BOOSTV_5000mV 0x10
288 #define CHARGER6_R06_BOOSTV_5150mV 0x20
289 #define CHARGER6_R06_BOOSTV_5300mV 0x30
290 #define CHARGER6_R06_VINDPM_800mV 0x08
291 #define CHARGER6_R06_VINDPM_400mV 0x04
292 #define CHARGER6_R06_VINDPM_200mV 0x02
293 #define CHARGER6_R06_VINDPM_100mV 0x01
294 
300 #define CHARGER6_R07_NOT_IN_INPUT_CURRENT_LIMIT 0x00
301 #define CHARGER6_R07_FORCE_INPUT_CURRENT_LIMIT 0x80
302 #define CHARGER6_R07_TMR2X_DISABLE 0x00
303 #define CHARGER6_R07_TMR2X_ENABLE 0x40
304 #define CHARGER6_R07_BATFET_ALLOW_Q4_TURN_ON 0x00
305 #define CHARGER6_R07_BATFET_TURN_OFF_Q4 0x20
306 #define CHARGER6_R07_JEITA_VSET_TO_4100mV 0x00
307 #define CHARGER6_R07_JEITA_VSET_TO_VREG 0x10
308 #define CHARGER6_R07_BATFET_IMMEDIATELY 0x00
309 #define CHARGER6_R07_BATFET_AFTER_10_SEC 0x08
310 #define CHARGER6_R07_BATFET_RST_DISABLE 0x00
311 #define CHARGER6_R07_BATFET_RST_ENABLE 0x04
312 #define CHARGER6_R07_VDPM_BAT_TRACK_DISABLE 0x00
313 #define CHARGER6_R07_VDPM_BAT_TRACK_VBAT_PLUS_200mV 0x01
314 #define CHARGER6_R07_VDPM_BAT_TRACK_VBAT_PLUS_250mV 0x02
315 #define CHARGER6_R07_VDPM_BAT_TRACK_VBAT_PLUS_300mV 0x03
316 
322 #define CHARGER6_R08_VBUS_BIT_MASK 0xE0
323 #define CHARGER6_R08_VBUS_STAT_NO_INPUT 0x00
324 #define CHARGER6_R08_VBUS_STAT_USB_HOST_SDP 0x20
325 #define CHARGER6_R08_VBUS_STAT_ADAPTER_2_4_A 0x40
326 #define CHARGER6_R08_VBUS_OTG 0xE0
327 #define CHARGER6_R08_CHRG_STAT_BIT_MASK 0x18
328 #define CHARGER6_R08_CHRG_STAT_NOT_CHARGING 0x00
329 #define CHARGER6_R08_CHRG_STAT_PRE_CHARGE 0x08
330 #define CHARGER6_R08_CHRG_STAT_FAST_CHARGING 0x10
331 #define CHARGER6_R08_CHRG_STAT_CHARGE_TERMINATION 0x18
332 #define CHARGER6_R08_PG_STAT_BIT_MASK 0x04
333 #define CHARGER6_R08_PG_STAT_POWER_NOT_GOOD 0x00
334 #define CHARGER6_R08_PG_STAT_POWER_GOOD 0x04
335 #define CHARGER6_R08_THERM_STAT_BIT_MASK 0x02
336 #define CHARGER6_R08_THERM_STAT_NOT_mAl 0x00
337 #define CHARGER6_R08_THERM_STAT_mAl 0x02
338 #define CHARGER6_R08_VSYS_BIT_MASK 0x01
339 #define CHARGER6_R08_VSYS_STAT_NOT 0x00
340 #define CHARGER6_R08_VSYS_STAT_VSYSM 0x01
341 
347 #define CHARGER6_R09_WATCHDOG_FAULT_BIT_MASK 0x80
348 #define CHARGER6_R09_WATCHDOG_FAULT_NORMAL 0x00
349 #define CHARGER6_R09_WATCHDOG_FAULT_TIMER_EXPIRATION 0x80
350 #define CHARGER6_R09_BOOST_FAULT_BIT_MASK 0x40
351 #define CHARGER6_R09_BOOST_FAULT_NORMAL 0x00
352 #define CHARGER6_R09_BOOST_FAULT_VBUS_OVERLOADED 0x40
353 #define CHARGER6_R09_CHRG_FAULT_BIT_MASK 0x30
354 #define CHARGER6_R09_CHRG_FAULT_NORMAL 0x00
355 #define CHARGER6_R09_CHRG_FAULT_INPUT_FAULT 0x10
356 #define CHARGER6_R09_CHRG_FAULT_THERMAL_SHUTDOWN 0x20
357 #define CHARGER6_R09_CHRG_FAULT_CHG_SAFETY_TIMER_EXP 0x30
358 #define CHARGER6_R09_BAT_FAULT_BIT_MASK 0x08
359 #define CHARGER6_R09_BAT_FAULT_NORMAL 0x00
360 #define CHARGER6_R09_BAT_FAULT_BATOVP 0x08
361 #define CHARGER6_R09_NTC_FAULT_BIT_MASK 0x07
362 #define CHARGER6_R09_NTC_FAULT_NORMAL 0x00
363 #define CHARGER6_R09_NTC_FAULT_WARM 0x02
364 #define CHARGER6_R09_NTC_FAULT_COOL 0x03
365 #define CHARGER6_R09_NTC_FAULT_COLD 0x05
366 #define CHARGER6_R09_NTC_FAULT_HOT 0x06
367 
373 #define CHARGER6_R0A_VBUS_GD_BIT_MASK 0x80
374 #define CHARGER6_R0A_VBUS_GD_NOT_VBUS 0x00
375 #define CHARGER6_R0A_VBUS_GD_VBUS_ATTACHED 0x80
376 #define CHARGER6_R0A_VBUS_GD_VINDPM_BIT_MASK 0x40
377 #define CHARGER6_R0A_VBUS_GD_NOT_IN_VINDPM 0x00
378 #define CHARGER6_R0A_VBUS_GD_IN_VINDPM 0x40
379 #define CHARGER6_R0A_VBUS_GD_IINDPM_BIT_MASK 0x20
380 #define CHARGER6_R0A_VBUS_GD_NOT_IN_IINDPM 0x00
381 #define CHARGER6_R0A_VBUS_GD_IN_IINDPM 0x20
382 #define CHARGER6_R0A_TOP_OFF_BIT_MASK 0x08
383 #define CHARGER6_R0A_TOP_OFF_TIMER_NOT_COUNTING 0x00
384 #define CHARGER6_R0A_TOP_OFF_TIMER_COUNTING 0x08
385 #define CHARGER6_R0A_ACOV_STAT_BIT_MASK 0x04
386 #define CHARGER6_R0A_ACOV_STAT_NOT_IN_ACOV 0x00
387 #define CHARGER6_R0A_ACOV_STAT_IN_ACOV 0x04
388 #define CHARGER6_R0A_VINDPM_INT_MASK_ALLOW 0x00
389 #define CHARGER6_R0A_VINDPM_INT_MASK_MASK 0x02
390 #define CHARGER6_R0A_IINDPM_INT_MASK_ALLOW 0x00
391 #define CHARGER6_R0A_IINDPM_INT_MASK_MASK 0x01
392 
398 #define CHARGER6_R0B_DEV_ID_BIT_MASK 0x78
399 #define CHARGER6_R0B_DEV_REV_BIT_MASK 0x03
400 
401 
407 #define CHARGER6_SET_DEV_ADDR 0x6B
408  // charger6_set
410 
425 #define CHARGER6_MAP_MIKROBUS( cfg, mikrobus ) \
426  cfg.scl = MIKROBUS( mikrobus, MIKROBUS_SCL ); \
427  cfg.sda = MIKROBUS( mikrobus, MIKROBUS_SDA ); \
428  cfg.ce = MIKROBUS( mikrobus, MIKROBUS_CS ); \
429  cfg.qon = MIKROBUS( mikrobus, MIKROBUS_RST ); \
430  cfg.psel = MIKROBUS( mikrobus, MIKROBUS_PWM ); \
431  cfg.int_pin = MIKROBUS( mikrobus, MIKROBUS_INT )
432  // charger6_map // charger6
435 
440 typedef struct
441 {
442  // Output pins
443 
444  digital_out_t ce;
445  digital_out_t qon;
446  digital_out_t psel;
448  // Input pins
449 
450  digital_in_t int_pin;
452  // Modules
453 
454  i2c_master_t i2c;
456  // I2C slave address
457 
458  uint8_t slave_address;
460 } charger6_t;
461 
466 typedef struct
467 {
468  pin_name_t scl;
469  pin_name_t sda;
471  pin_name_t ce;
472  pin_name_t qon;
473  pin_name_t psel;
474  pin_name_t int_pin;
476  uint32_t i2c_speed;
477  uint8_t i2c_address;
480 
485 typedef struct
486 {
487  uint8_t vbus_stat;
488  uint8_t chrg_stat;
489  uint8_t pg_stat;
490  uint8_t therm_stat;
491  uint8_t vsys_stat;
492  uint8_t watchdog_fault;
493  uint8_t boost_fault;
494  uint8_t chrg_fault;
495  uint8_t bat_fault;
496  uint8_t ntc_fault;
497  uint8_t vbus_gd;
498  uint8_t vindpm_stat;
499  uint8_t iindpm_stat;
500  uint8_t topoff_active;
501  uint8_t acov_stat;
502  uint8_t vindpm_int;
503  uint8_t iindpm_int;
504  uint8_t dev_id;
505  uint8_t dev_rev;
506 }
508 
513 typedef enum
514 {
516  CHARGER6_ERROR = -1
517 
519 
538 
556 
573 
591 err_t charger6_generic_write ( charger6_t *ctx, uint8_t reg, uint8_t *tx_buf, uint8_t tx_len );
592 
610 err_t charger6_generic_read ( charger6_t *ctx, uint8_t reg, uint8_t *rx_buf, uint8_t rx_len );
611 
627 
643 
663 void charger6_power_source_selection ( charger6_t *ctx, uint8_t pwr_sel );
664 
686 err_t charger6_set_input_current_limit ( charger6_t *ctx, uint16_t current_limit );
687 
706 err_t charger6_set_system_minimum_voltage ( charger6_t *ctx, uint16_t sys_min_voltage );
707 
727 
749 err_t charger6_set_fast_charge_current ( charger6_t *ctx, uint16_t fast_chg_current );
750 
767 
786 err_t charger6_set_precharge_current ( charger6_t *ctx, uint16_t precharge_current );
787 
806 err_t charger6_set_termination_current ( charger6_t *ctx, uint16_t termination_current );
807 
826 err_t charger6_set_charge_voltage ( charger6_t *ctx, uint16_t charge_voltage );
827 
850 err_t charger6_set_top_off_timer ( charger6_t *ctx, uint8_t top_off_time );
851 
868 
885 
886 #ifdef __cplusplus
887 }
888 #endif
889 #endif // CHARGER6_H
890  // charger6
892 
893 // ------------------------------------------------------------------------ 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:494
charger6_cfg_t
Charger 6 Click configuration object.
Definition: charger6.h:467
charger6_t::ce
digital_out_t ce
Definition: charger6.h:444
charger6_status_t::vindpm_stat
uint8_t vindpm_stat
Definition: charger6.h:498
charger6_status_t
Charger 6 Click data status structure definition.
Definition: charger6.h:486
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:490
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:501
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:446
charger6_status_t::vsys_stat
uint8_t vsys_stat
Definition: charger6.h:491
charger6_t::i2c
i2c_master_t i2c
Definition: charger6.h:454
charger6_cfg_t::i2c_address
uint8_t i2c_address
Definition: charger6.h:477
charger6_status_t::dev_id
uint8_t dev_id
Definition: charger6.h:504
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:503
charger6_status_t::iindpm_stat
uint8_t iindpm_stat
Definition: charger6.h:499
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:469
charger6_status_t::boost_fault
uint8_t boost_fault
Definition: charger6.h:493
charger6_hw_reset
void charger6_hw_reset(charger6_t *ctx)
Charger 6 hw reset function.
CHARGER6_ERROR
@ CHARGER6_ERROR
Definition: charger6.h:516
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:472
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:474
charger6_t::qon
digital_out_t qon
Definition: charger6.h:445
charger6_status_t::vbus_gd
uint8_t vbus_gd
Definition: charger6.h:497
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:496
CHARGER6_OK
@ CHARGER6_OK
Definition: charger6.h:515
charger6_cfg_t::scl
pin_name_t scl
Definition: charger6.h:468
charger6_t
Charger 6 Click context object.
Definition: charger6.h:441
charger6_status_t::chrg_stat
uint8_t chrg_stat
Definition: charger6.h:488
charger6_status_t::bat_fault
uint8_t bat_fault
Definition: charger6.h:495
charger6_status_t::watchdog_fault
uint8_t watchdog_fault
Definition: charger6.h:492
charger6_status_t::dev_rev
uint8_t dev_rev
Definition: charger6.h:505
charger6_status_t::vbus_stat
uint8_t vbus_stat
Definition: charger6.h:487
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:489
charger6_return_value_t
charger6_return_value_t
Charger 6 Click return value data.
Definition: charger6.h:514
charger6_status_t::topoff_active
uint8_t topoff_active
Definition: charger6.h:500
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:471
charger6_status_t::vindpm_int
uint8_t vindpm_int
Definition: charger6.h:502
charger6_cfg_t::i2c_speed
uint32_t i2c_speed
Definition: charger6.h:476
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:473
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:458
charger6_t::int_pin
digital_in_t int_pin
Definition: charger6.h:450
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.