-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathPF1550_Defines.h
85 lines (65 loc) · 3.72 KB
/
PF1550_Defines.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
/*
Copyright (c) 2019 Arduino. All right reserved.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef PF1550_DEFINES_H_
#define PF1550_DEFINES_H_
/******************************************************************************
DEFINE
******************************************************************************/
/* INT_CATEGORY ***************************************************************/
#define REG_INT_CATEGORY_CHG_INT_bp (0)
#define REG_INT_CATEGORY_SW1_INT_bp (1)
#define REG_INT_CATEGORY_SW2_INT_bp (2)
#define REG_INT_CATEGORY_SW3_INT_bp (3)
#define REG_INT_CATEGORY_LDO_INT_bp (4)
#define REG_INT_CATEGORY_ONKEY_INT_bp (5)
#define REG_INT_CATEGORY_TEMP_INT_bp (6)
#define REG_INT_CATEGORY_MISC_INT_bp (7)
/* SW1_CTRL1 ******************************************************************/
#define REG_SW1_CTRL1_SW1_ILIM_mask (0x03)
/* SW1_CTRL *******************************************************************/
#define REG_SW1_CTRL_SW1_EN_bp (0)
#define REG_SW1_CTRL_SW1_STBY_EN_bp (1)
#define REG_SW1_CTRL_SW1_OMODE_bp (2)
/* SW2_CTRL *******************************************************************/
#define REG_SW2_CTRL_SW2_EN_bp (0)
#define REG_SW2_CTRL_SW2_STBY_EN_bp (1)
#define REG_SW2_CTRL_SW2_OMODE_bp (2)
/* SW2_CTRL1 ******************************************************************/
#define REG_SW2_CTRL1_SW2_ILIM_mask (0x03)
/* LDO1_CTRL ******************************************************************/
#define REG_LDO1_CTRL_VLDO1_EN_bp (0)
#define REG_LDO1_CTRL_VLDO1_STBY_EN_bp (1)
#define REG_LDO1_CTRL_VLDO1_OMODE_bp (2)
/* LDO2_CTRL ******************************************************************/
#define REG_LDO2_CTRL_VLDO2_EN_bp (0)
#define REG_LDO2_CTRL_VLDO2_STBY_EN_bp (1)
#define REG_LDO2_CTRL_VLDO2_OMODE_bp (2)
/* LDO3_CTRL ******************************************************************/
#define REG_LDO3_CTRL_VLDO3_EN_bp (0)
#define REG_LDO3_CTRL_VLDO3_STBY_EN_bp (1)
#define REG_LDO3_CTRL_VLDO3_OMODE_bp (2)
/* CHG_EOC_CNFG ***************************************************************/
#define REG_CHG_EOC_CNFG_IEOC_mask (0x70)
/* CHG_CURR_CFG ***************************************************************/
#define REG_CHG_CURR_CFG_CHG_CC_mask (0x1F)
/* BATT_REG *******************************************************************/
#define REG_BATT_REG_CHCCV_mask (0x3F)
/* VBUS_INLIM_CNFG ************************************************************/
#define REG_VBUS_INLIM_CNFG_VBUS_LIN_INLIM_mask (0xF8)
/* LED_PWM ********************************************************************/
#define REG_LED_PWM_LED_EN_bp (7)
/* LED_CNFG *******************************************************************/
#define REG_LED_CNFG_LEDOVRD_bp (5)
#endif /* PF1550_DEFINES_H_ */