Toggle navigation
Documentation
The friendly Operating System for the Internet of Things
Loading...
Searching...
No Matches
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
20
#ifndef BQ2429X_INTERNAL_H
21
#define BQ2429X_INTERNAL_H
22
23
#ifdef __cplusplus
24
extern
"C"
{
25
#endif
26
30
#define BQ2429X_I2C_ADDR (0x6B)
31
36
#define BQ2429X_REG00 (0x00)
37
#define BQ2429X_REG01 (0x01)
38
#define BQ2429X_REG02 (0x02)
39
#define BQ2429X_REG04 (0x04)
40
#define BQ2429X_REG05 (0x05)
42
#define BQ2429X_REG08 (0x08)
43
#define BQ2429X_REG09 (0x09)
44
#define BQ2429X_REG0A (0x0A)
52
#define BQ2429X_REG00_VINDPM_m (0x78)
53
#define BQ2429X_REG00_VINDPM_s (3)
54
#define BQ2429X_REG00_IINLIM_m (0x07)
55
#define BQ2429X_REG00_IINLIM_s (0)
56
57
#define BQ2429X_REG01_OTG_m (0x20)
58
#define BQ2429X_REG01_OTG_s (5)
59
#define BQ2429X_REG01_OTG_ENABLE (1)
60
#define BQ2429X_REG01_OTG_DISABLE (0)
61
#define BQ2429X_REG01_CHG_m (0x10)
62
#define BQ2429X_REG01_CHG_s (4)
63
#define BQ2429X_REG01_CHG_ENABLE (1)
64
#define BQ2429X_REG01_CHG_DISABLE (0)
65
66
#define BQ2429X_REG02_ICHG_m (0xFC)
67
#define BQ2429X_REG02_ICHG_s (2)
68
69
#define BQ2429X_REG04_VREG_m (0xFC)
70
#define BQ2429X_REG04_VREG_s (2)
71
72
#define BQ2429X_REG05_WD_m (0x30)
73
#define BQ2429X_REG05_WD_s (4)
74
#define BQ2429X_REG05_WD_DISABLE (0x00)
75
76
#define BQ2429X_REG08_VBUS_STATUS_m (0xC0)
77
#define BQ2429X_REG08_VBUS_STATUS_s (6)
78
#define BQ2429X_REG08_CHG_STAT_m (0x30)
79
#define BQ2429X_REG08_CHG_STAT_s (4)
80
#define BQ2429X_REG08_DPM_STAT_m (0x08)
81
#define BQ2429X_REG08_DPM_STAT_s (3)
82
#define BQ2429X_REG08_PG_STAT_m (0x04)
83
#define BQ2429X_REG08_PG_STAT_s (2)
84
#define BQ2429X_REG08_THERM_STAT_m (0x02)
85
#define BQ2429X_REG08_THERM_STAT_s (1)
86
#define BQ2429X_REG08_VSYS_STAT_m (0x01)
87
#define BQ2429X_REG08_VSYS_STAT_s (0)
88
89
#define BQ2429X_REG09_WD_FAULT_m (0x80)
90
#define BQ2429X_REG09_WD_FAULT_s (7)
91
#define BQ2429X_REG09_OTG_FAULT_m (0x40)
92
#define BQ2429X_REG09_OTG_FAULT_s (6)
93
#define BQ2429X_REG09_CHRG_FAULT_m (0x30)
94
#define BQ2429X_REG09_CHRG_FAULT_s (4)
95
#define BQ2429X_REG09_BAT_FAULT_m (0x08)
96
#define BQ2429X_REG09_BAT_FAULT_s (3)
97
#define BQ2429X_REG09_NTC_FAULT_1_m (0x02)
98
#define BQ2429X_REG09_NTC_FAULT_1_s (1)
99
#define BQ2429X_REG09_NTC_FAULT_0_m (0x01)
100
#define BQ2429X_REG09_NTC_FAULT_0_s (0)
103
#ifdef __cplusplus
104
}
105
#endif
106
107
#endif
/* BQ2429X_INTERNAL_H */
Generated on Sat Dec 21 2024 20:58:02 by
1.9.8