forked from SZV10X_Software/SZV103_FM33A0xxEV_SiZhu

周巍
2024-04-11 91ef77c00ed797b1048c5187f416e351e646a009
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
#ifndef _powermanage_H
#define _powermanage_H
#include "sys.h"
 
//Êý×ÖÊäÈë
#define POWER_SELECT_DEC_PIN_NUM                                           GPIO_Pin_2
#define POWER_SELECT_DEC_PIN_GROUP                                      GPIOC
 
//Ä£ÄâÊäÈë
#define POWER_ELECTRIC_QUANTITY_PIN_NUM                                    GPIO_Pin_3
#define POWER_ELECTRIC_QUANTITY_PIN_GROUP                                  GPIOC
 
//µÍѹÐźÅ
#define UNDERVOL_PIN_NUM                                GPIO_Pin_9
#define UNDERVOL_PIN_GROUP                              GPIOE
//ǷѹÐźÅ
#define LOWVOL_PIN_NUM                                    GPIO_Pin_10
#define LOWVOL_PIN_GROUP                                  GPIOE
 
#define    HIGH                            0
#define    LOW                                1
 
//ÔÚб·´ÉäÁìÓòÉÏÓ²¼þÐźŷ¢ÉúÁ˱ä¸ü
#define    POWER_EXTERN                0
#define    POWER_BAT                        1
 
 
#define UNDERVOL_SIGNL_HIGH                                 PEout(9)     = 1;
#define UNDERVOL_SIGNL_LOW                                 PEout(9)     = 0;
 
#define LOWVOL_SIGNL_HIGH                                 PEout(10)     = 1;
#define LOWVOL_SIGNL_LOW                                 PEout(10)     = 0;
 
 
 
 
 
/*ÍⲿÄÚ²¿µçÔ´io³õʼ»¯*/
void power_io_dec_init(void);
/*¶ÁÈ¡µçÔ´io ×´Ì¬*/
u8 power_io_get(void);
void power_io_dec_lower_power_init(void);
 
/*Êä³öÂö³å*/
void lowvol_io_power(void);
    
/*Êä³öÂö³å*/
void undervol_io_power(void);
 
 
#endif