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

📄 chip.inc

📁 ELAN IR接收
💻 INC
字号:
include "Regdef.inc"

ifndef	CHIP_INC
		;防止重复加载
		CHIP_INC	equ	0x01

PC			EQU		R2_PC
STATUS			EQU		R3_STATUS

;port5 的定义
PORT5			EQU		R5_P5
USB_DET			EQU		0x00
LCD_WT			EQU		0x01
AUX7			EQU		0x02
USB_RST			EQU		0x03

usb_port		EQU		PORT5
usb_pin			EQU		0x00
light_port		EQU		PORT5
light_pin		EQU		0x03

;port6 的定义
PORT6			EQU		R6_P6
ir_port			EQU		R6_P6
key_port		EQU		R6_P6
;TEST 
ctrl_port		EQU		R6_P6
dmp_pin			EQU		0x2

ir_pin		 	EQU		0x0
IR			EQU		0x00
KEY_0			EQU		0x04
KEY_1			EQU		0x05
LCD_DATA		EQU		0x06
LCD_CS			EQU		0x07

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
randomval		EQU		0x10
passwordval		EQU		0x11
password_ok		EQU		0x12


;ir special register
ir_flag			EQU		0x13			
ir_data_low		EQU		0x14		;存地址码低位,接收完成的时候ir数据存在此处
ir_data_high		EQU		0x15		;存地址码低高位
rec_is			EQU		0x16		;if(ir_rec_ok==rec_is_ok) ir receive is success else ir_rec_ok==0x00

;available define 
ht1621_temp		EQU		0x17		;用于HT1621发送计数
counter			EQU		0x18		;用于计数
delay			EQU		0x19		;用于延时
ht1621_comm_high	EQU		0x1a		;用于存储lcd命令的高位
ht1621_comm_low		EQU		0x1b		;用于存储lcd命令的低位
count8		  	EQU		0x1c		;临时变量
count2		  	EQU		0x1d
TmpA			EQU		0x1e
TmpB			EQU		0x1f

wwj_iic_counter		EQU		0x20
;backup ir key
repkey_cnt		EQU		0x21		;重复码计数器
irend_cnt	 	EQU		0x22		;遥控码结束计数器,计数到irport高电位超时时,发送短按key

ht1621_wr_addr		EQU		0x23
ht1621_wr_data		EQU		0x24

comm_tmp		EQU		0x25
delay_90us		EQU		0x26
wwj_iic_val		EQU		0x27		;
long_press		EQU		0x28
key_counter 		EQU		0x29

iic_senddata		EQU		0x2a
iic_val			EQU		0x2b
ht1621_val		EQU		0x2c
is_iic_recved		EQU		0x2d

iic_recvindex		EQU		0x2e
iic_recvdata		EQU		0x2f

iic_counter		EQU		0x30
iic_total_counter	EQU		0x31
iic_temp		EQU		0x32
delay_4			EQU		0x33		;
delay_20		EQU		0x34		;


counter_temp		EQU		0x35		;

delay_10		EQU		0x36		;
usb_status		EQU		0x37

pwr_on_off		EQU		0x38

iic_sendcom		EQU		0x39

password_err          	EQU		0x3a
en_password_chk		EQU		0x3b

wwj_chk_temp		EQU		0x3c
tone_delay		EQU		0x3d

key_delay		EQU		0x3e

curr_play_state		EQU		0x3f

;ir接收标志byte
rec_ir_data	 	EQU		0x04
lcd_init_flag		EQU		0x40
rec_is_ok	   	EQU		0x80	

;常数定义
DELAY_64MS		EQU		0x40		;delay time
DELAY_10MS		EQU		0x64

IR_ADDR_LOW		EQU		0x00		;0x4;ir remote address code 
IR_ADDR_HIGH	    	EQU		0xFF		;0xfb
DELAY90US		EQU		50
SEED_KEY		EQU		0x30
LONG			EQU		200
KEY_EXCURSION   	EQU		0xe			;短按键和对应长按键在键值表中的偏移距离


endif

⌨️ 快捷键说明

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