⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 power.h

📁 我个人编写的车载dvd上的程序
💻 H
字号:
/*********************************************************
	Project:		ST FST(TDA7540)
	File name:	power.h
	Description:	
	Write/Modify:	Perry
	Time:		2005-11-22- 11:55:42
*********************************************************/
extern void AccCheck(void);
extern void PowerOn(void);
extern void PowerOff(void);
extern void PowerInit(void);
extern void AccMain(void);
extern void AccProc(void);
extern void AccDisp(void);
extern void PowerMain(void);
extern void PowerTimer10ms(void);
extern void PowerTimer1s(void);
extern void ACCTimer100ms(void);
extern void PowerProc(void);
extern void PowerDisp(void);

#define PD_ACC PI_DDR0
#define PCR1_ACC PI_CR10
#define PCR2_ACC   PI_CR20
//#define PinIn_ACC    PI_IDR0

#define PinIn_ACC	1
//#define PinIn_ACC PI_IDR0

#define PD_POWER      PD_DDR7
#define PCR1_POWER  PD_CR17
#define PCR2_POWER  PD_CR27
#define Pin_POWER     PD_ODR7

#ifdef REDUCE_POWER_CONSUMER  

#define PD_BTCTR    PB_DDR5
#define PCR1_BTCTR  PB_CR15
#define PCR2_BTCTR  PB_CR25
#define PIN_BTCTR   PB_ODR5

#define PD_DVDPOWER PC_DDR6
#define PCR1_DVDPOWER PC_CR16
#define PCR2_DVDPOWER PC_CR26
#define PIN_DVDPOWER  PC_ODR6

#define PD_ANTPOWER PG_DDR0
#define PCR1_ANTPOWER PG_CR10
#define PCR2_ANTPOWER PG_CR20
#define PIN_ANTPOWER  PG_ODR0

#define PD_CAMERAPOWER  PG_DDR1
#define PCR1_CAMERAPOWER PG_CR11
#define PCR2_CAMERAPOWER PG_CR21
#define PIN_CAMERAPOWER PG_ODR1

#define PD_AMPCTR    PG_DDR2
#define PCR1_AMPCTR PG_CR12
#define PCR2_AMPCTR PG_CR22
#define PIN_AMPCTR   PG_ODR2

#define PD_BREAKDET  PG_DDR3
#define PCR1_BREAKDET PG_CR13
#define PCR2_BREAKDET PG_CR23
#define PINin_BREAKDET PG_IDR3

#define PD_LIGHTDET  PG_DDR4
#define PCR1_LIGHTDET PG_CR14
#define PCR2_LIGHTDET PG_CR24
#define PINin_LIGHTDET PG_IDR4

#define PD_TOUCHDET  PD_DDR3
#define PCR1_TOUTCHDET PD_CR13
#define PCR2_TOUTCHDET PD_CR23
#define PINin_TOUCHDET PD_IDR3



#endif

ext unsigned char AccDelay;
ext unsigned char AccWaitTimer;
ext unsigned char PowerWaitTimer;
ext unsigned char WakeUpTimer;

ext unsigned char AccState;
#define ACC_OFF   		0
#define ACC_ONTEST   	1
#define ACC_ON   			2
#define ACC_OFFTEST   	3

ext unsigned char SlpState;
#define SLP_IDLE   		0
#define SLP_  	1
#define SLP_ON   			2
#define SLP_Wait   	3

/*********************************************************
				File End
*********************************************************/

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -