Toggle navigation
Documentation
The friendly Operating System for the Internet of Things
bq2429x_internal.h
Go to the documentation of this file.
1
/*
2
* Copyright (C) 2020 Locha Inc
3
*
4
* This file is subject to the terms and conditions of the GNU Lesser
5
* General Public License v2.1. See the file LICENSE in the top level
6
* directory for more details.
7
*/
8
9
#pragma once
10
22
#ifdef __cplusplus
23
extern
"C"
{
24
#endif
25
29
#define BQ2429X_I2C_ADDR (0x6B)
30
35
#define BQ2429X_REG00 (0x00)
36
#define BQ2429X_REG01 (0x01)
37
#define BQ2429X_REG02 (0x02)
38
#define BQ2429X_REG04 (0x04)
39
#define BQ2429X_REG05 (0x05)
41
#define BQ2429X_REG08 (0x08)
42
#define BQ2429X_REG09 (0x09)
43
#define BQ2429X_REG0A (0x0A)
51
#define BQ2429X_REG00_VINDPM_m (0x78)
52
#define BQ2429X_REG00_VINDPM_s (3)
53
#define BQ2429X_REG00_IINLIM_m (0x07)
54
#define BQ2429X_REG00_IINLIM_s (0)
55
56
#define BQ2429X_REG01_OTG_m (0x20)
57
#define BQ2429X_REG01_OTG_s (5)
58
#define BQ2429X_REG01_OTG_ENABLE (1)
59
#define BQ2429X_REG01_OTG_DISABLE (0)
60
#define BQ2429X_REG01_CHG_m (0x10)
61
#define BQ2429X_REG01_CHG_s (4)
62
#define BQ2429X_REG01_CHG_ENABLE (1)
63
#define BQ2429X_REG01_CHG_DISABLE (0)
64
65
#define BQ2429X_REG02_ICHG_m (0xFC)
66
#define BQ2429X_REG02_ICHG_s (2)
67
68
#define BQ2429X_REG04_VREG_m (0xFC)
69
#define BQ2429X_REG04_VREG_s (2)
70
71
#define BQ2429X_REG05_WD_m (0x30)
72
#define BQ2429X_REG05_WD_s (4)
73
#define BQ2429X_REG05_WD_DISABLE (0x00)
74
75
#define BQ2429X_REG08_VBUS_STATUS_m (0xC0)
76
#define BQ2429X_REG08_VBUS_STATUS_s (6)
77
#define BQ2429X_REG08_CHG_STAT_m (0x30)
78
#define BQ2429X_REG08_CHG_STAT_s (4)
79
#define BQ2429X_REG08_DPM_STAT_m (0x08)
80
#define BQ2429X_REG08_DPM_STAT_s (3)
81
#define BQ2429X_REG08_PG_STAT_m (0x04)
82
#define BQ2429X_REG08_PG_STAT_s (2)
83
#define BQ2429X_REG08_THERM_STAT_m (0x02)
84
#define BQ2429X_REG08_THERM_STAT_s (1)
85
#define BQ2429X_REG08_VSYS_STAT_m (0x01)
86
#define BQ2429X_REG08_VSYS_STAT_s (0)
87
88
#define BQ2429X_REG09_WD_FAULT_m (0x80)
89
#define BQ2429X_REG09_WD_FAULT_s (7)
90
#define BQ2429X_REG09_OTG_FAULT_m (0x40)
91
#define BQ2429X_REG09_OTG_FAULT_s (6)
92
#define BQ2429X_REG09_CHRG_FAULT_m (0x30)
93
#define BQ2429X_REG09_CHRG_FAULT_s (4)
94
#define BQ2429X_REG09_BAT_FAULT_m (0x08)
95
#define BQ2429X_REG09_BAT_FAULT_s (3)
96
#define BQ2429X_REG09_NTC_FAULT_1_m (0x02)
97
#define BQ2429X_REG09_NTC_FAULT_1_s (1)
98
#define BQ2429X_REG09_NTC_FAULT_0_m (0x01)
99
#define BQ2429X_REG09_NTC_FAULT_0_s (0)
102
#ifdef __cplusplus
103
}
104
#endif
105
Generated on Sat Jun 28 2025 19:41:33 by
1.9.1