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

📄 intctrl.h

📁 philip RTC 芯片的驱动程序 8563
💻 H
字号:
#ifndef	__INTCTRL_H__
#define	__INTCTRL_H__


#define     INT_EXT0      0
#define     INT_Timer0    1
#define     INT_EXT1      2
#define     INT_Timer1    3
#define     INT_Serial    4
#define     INT_Timer2    5
#define     US_FOR_INT    1
#define     US_FOR_TIMER  2
#define     US_FOR_SERIAL 3
#define     Timer0_CntL 		  TL0
#define     Timer0_CntH 		  TH0
#define     Start_Timer0       (TR0=1)
#define     Stop_Timer0        (TR0=0)
#define     Timer0_INT_Disable (ET0=0)
#define     Timer1_CntL 		  TL1
#define     Timer1_CntH 	      TH1
#define     Timer2_CntL 		  TL2
#define     Timer2_CntH 	      TH2
#define     Start_Timer1       (TR1=1)
#define     Stop_Timer1        (TR1=0)
#define     Timer1_INT_Enable  (ET1=1)
#define     Timer1_INT_Disable (ET1=0)
#define     Timer2_CntL 		  TL2
#define     Timer2_CntH 	      TH2
#define     Start_Timer2       (TR2=1)
#define     Stop_Timer2        (TR2=0)
#define	    IRRepEnable
#ifdef 		OSCFREQ110592
#define 	IR_ERR	    275
#define	    CODE_0_MIN	(1032-IR_ERR)
#define     CODE_0_MAX	(1032+IR_ERR)
#define		CODE_1_MIN	(2064-IR_ERR*2)
#define		CODE_1_MAX	(2064+IR_ERR*2)
#define	    IR_HEAD_MIN (8294+4147-IR_ERR*2)
#define	    IR_HEAD_MAX (8294+4147+IR_ERR*2)
#define	    IR_REP_MIN	(8294+2304-IR_ERR*2)
#define	    IR_REP_MAX	(8294+2304+IR_ERR*2)
#else
#define 	IR_ERR	300
#define	    CODE_0_MIN	(1120-IR_ERR)
#define     CODE_0_MAX	(1120+IR_ERR)
#define		CODE_1_MIN	(2240-IR_ERR*2)
#define		CODE_1_MAX	(2240+IR_ERR*2)
#define	    IR_HEAD_MIN (9000+4500-IR_ERR*2)
#define	    IR_HEAD_MAX (9000+4500+IR_ERR*2)
#define	    IR_REP_MIN	(9000+2500-IR_ERR*2)
#define	    IR_REP_MAX	(9000+2500+IR_ERR*2)
#endif
enum IR_STATE
{
	IR_READY = 0,
	IR_HEAD,
	IR_OFFCODE,
	IR_ADDRESS,
	IR_CODE
};
void RemoteInt(void);
void NotUsing(void);
void TIMER0Int(void);
void TIMER1Int(void);
void TIMER2Int(void);
void SerialInt(void);
#endif

⌨️ 快捷键说明

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