📄 register.h
字号:
volatile unsigned int *MSGID4L =(volatile unsigned int *)0x7220; /* CAN邮箱4消息标识符(低16位字)*/
volatile unsigned int *MSGID4H =(volatile unsigned int *)0x7221; /* CAN邮箱4消息标识符(高16位字)*/
volatile unsigned int *MSGCTRL4 =(volatile unsigned int *)0x7222; /* CAN邮箱4消息控制域寄存器*/
volatile unsigned int *MBX4A =(volatile unsigned int *)0x7224; /* CAN邮箱4中邮箱RAM的2个字节*/
volatile unsigned int *MBX4B =(volatile unsigned int *)0x7225; /* CAN邮箱4中邮箱RAM的2个字节*/
volatile unsigned int *MBX4C =(volatile unsigned int *)0x7226; /* CAN邮箱4中邮箱RAM的2个字节*/
volatile unsigned int *MBX4D =(volatile unsigned int *)0x7227; /*CAN邮箱4中邮箱RAM的2个字节*/
volatile unsigned int *MSGID5L =(volatile unsigned int *)0x7228; /* CAN邮箱5消息标识符(低16位字)*/
volatile unsigned int *MSGID5H =(volatile unsigned int *)0x7229; /*CAN邮箱5消息标识符(高16位字)*/
volatile unsigned int *MSGCTRL5 =(volatile unsigned int *)0x722A; /*CAN邮箱5消息控制域寄存器*/
volatile unsigned int *MBX5A =(volatile unsigned int *)0x722C; /*CAN邮箱5中邮箱RAM的2个字节*/
volatile unsigned int *MBX5B =(volatile unsigned int *)0x722D; /*CAN邮箱5中邮箱RAM的2个字节*/
volatile unsigned int *MBX5C =(volatile unsigned int *)0x722E; /*CAN邮箱5中邮箱RAM的2个字节*/
volatile unsigned int *MBX5D =(volatile unsigned int *)0x722F; /*CAN邮箱5中邮箱RAM的2个字节*/
/*事件管理器A (EVA)寄存器
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
volatile unsigned int *GPTCONA =(volatile unsigned int *)0x7400; /*通用定时控制寄存器*/
volatile unsigned int *T1CNT =(volatile unsigned int *)0x7401; /*通用定时器 1 计数寄存器*/
volatile unsigned int *T1CMPR =(volatile unsigned int *)0x7402; /*通用定时器 1 比较寄存器*/
volatile unsigned int *T1PER =(volatile unsigned int *)0x7403; /*通用定时器 1 周期寄存器*/
volatile unsigned int *T1CON =(volatile unsigned int *)0x7404; /*通用定时器 1 控制寄存器*/
volatile unsigned int *T2CNT =(volatile unsigned int *)0x7405; /*通用定时器 2 计数寄存器*/
volatile unsigned int *T2CMPR =(volatile unsigned int *)0x7406; /*通用定时器 2 比较寄存器*/
volatile unsigned int *T2PER =(volatile unsigned int *)0x7407; /*通用定时器 2 周期寄存器*/
volatile unsigned int *T2CON =(volatile unsigned int *)0x7408; /*通用定时器 2 控制寄存器*/
volatile unsigned int *COMCONA =(volatile unsigned int *)0x7411; /*比较控制寄存器 A*/
volatile unsigned int *ACTRA =(volatile unsigned int *)0x7413; /*全比较操作控制寄存器 A */
volatile unsigned int *DBTCONA =(volatile unsigned int *)0x7415; /*死区时间控制寄存器 A*/
volatile unsigned int *CMPR1 =(volatile unsigned int *)0x7417; /*全比较单元 1 比较寄存器*/
volatile unsigned int *CMPR2 =(volatile unsigned int *)0x7418; /*全比较单元 2 比较寄存器*/
volatile unsigned int *CMPR3 =(volatile unsigned int *)0x7419; /*全比较单元 3 比较寄存器*/
volatile unsigned int *CAPCONA =(volatile unsigned int *)0x7420; /*捕获控制寄存器 A*/
volatile unsigned int *CAPFIFOA =(volatile unsigned int *)0x7422; /*捕获FIFO 状态寄存器 A*/
volatile unsigned int *CAP1FIFO =(volatile unsigned int *)0x7423; /*捕获 1 FIFO栈顶寄存器*/
volatile unsigned int *CAP2FIFO =(volatile unsigned int *)0x7424; /*捕获 2 FIFO栈顶寄存器*/
volatile unsigned int *CAP3FIFO =(volatile unsigned int *)0x7425; /*捕获3 FIFO栈顶寄存器*/
volatile unsigned int *CAP1FBOT =(volatile unsigned int *)0x7427; /*捕获1 FIFO栈底寄存器*/
volatile unsigned int *CAP2FBOT =(volatile unsigned int *)0x7428; /*捕获2 FIFO栈底寄存器*/
volatile unsigned int *CAP3FBOT =(volatile unsigned int *)0x7429; /*捕获3 FIFO栈底寄存器*/
volatile unsigned int *EVAIMRA =(volatile unsigned int *)0x742C; /*事件管理器中断屏蔽寄存器 A*/
volatile unsigned int *EVAIMRB =(volatile unsigned int *)0x742D; /*事件管理器中断屏蔽寄存器 B*/
volatile unsigned int *EVAIMRC =(volatile unsigned int *)0x742E; /*事件管理器中断屏蔽寄存器 C*/
volatile unsigned int *EVAIFRA =(volatile unsigned int *)0x742F; /*事件管理器中断标志寄存器 A*/
volatile unsigned int *EVAIFRB =(volatile unsigned int *)0x7430; /*事件管理器中断标志寄存器 B*/
volatile unsigned int *EVAIFRC =(volatile unsigned int *)0x7431; /*事件管理器中断标志寄存器 C*/
/*事件管理器B(EVB)
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
volatile unsigned int *GPTCONB =(volatile unsigned int *)0x7500; /*通用定时控制寄存器B*/
volatile unsigned int *T3CNT =(volatile unsigned int *)0x7501; /*通用定时器3计数寄存器*/
volatile unsigned int *T3CMPR =(volatile unsigned int *)0x7502; /*通用定时器3比较寄存器*/
volatile unsigned int *T3PER =(volatile unsigned int *)0x7503; /*通用定时器3周期寄存器*/
volatile unsigned int *T3CON =(volatile unsigned int *)0x7504; /*通用定时器3控制寄存器*/
volatile unsigned int *T4CNT =(volatile unsigned int *)0x7505; /*通用定时器4计数寄存器*/
volatile unsigned int *T4CMPR =(volatile unsigned int *)0x7506; /*通用定时器4比较寄存器*/
volatile unsigned int *T4PER =(volatile unsigned int *)0x7507; /*通用定时器4周期寄存器*/
volatile unsigned int *T4CON =(volatile unsigned int *)0x7508; /*通用定时器4控制寄存器*/
volatile unsigned int *COMCONB =(volatile unsigned int *)0x7511; /*比较控制寄存器B*/
volatile unsigned int *ACTRB =(volatile unsigned int *)0x7513; /*全比较控制寄存器B*/
volatile unsigned int *DBTCONB =(volatile unsigned int *)0x7515; /*死区定时器控制寄存器B*/
volatile unsigned int *CMPR4 =(volatile unsigned int *)0x7517; /*全比较单元比较寄存器4*/
volatile unsigned int *CMPR5 =(volatile unsigned int *)0x7518; /*全比较单元比较寄存器5*/
volatile unsigned int *CMPR6 =(volatile unsigned int *)0x7519; /*全比较单元比较寄存器6*/
volatile unsigned int *CAPCONB =(volatile unsigned int *)0x7520; /*捕获控制寄存器B*/
volatile unsigned int *CAPFIFOB =(volatile unsigned int *)0x7522; /*捕获FIFO状态寄存器B*/
volatile unsigned int *CAP4FIFO =(volatile unsigned int *)0x7523; /*捕获4 FIFO栈顶寄存器*/
volatile unsigned int *CAP5FIFO =(volatile unsigned int *)0x7524; /*捕获5 FIFO栈顶寄存器*/
volatile unsigned int *CAP6FIFO =(volatile unsigned int *)0x7525; /*捕获6 FIFO栈顶寄存器*/
volatile unsigned int *CAP4FBOT =(volatile unsigned int *)0x7527; /*捕获4 FIFO栈底寄存器*/
volatile unsigned int *CAP5FBOT =(volatile unsigned int *)0x7528; /*捕获5 FIFO栈底寄存器*/
volatile unsigned int *CAP6FBOT =(volatile unsigned int *)0x7529; /*捕获6 FIFO栈底寄存器*/
volatile unsigned int *EVBIMRA =(volatile unsigned int *)0x752C; /*事件管理器中断屏蔽寄存器 A*/
volatile unsigned int *EVBIMRB =(volatile unsigned int *)0x752D; /*事件管理器中断屏蔽寄存器 B*/
volatile unsigned int *EVBIMRC =(volatile unsigned int *)0x752E; /*事件管理器中断屏蔽寄存器 C*/
volatile unsigned int *EVBIFRA =(volatile unsigned int *)0x752F; /*事件管理器中断标志寄存器 A*/
volatile unsigned int *EVBIFRB =(volatile unsigned int *)0x7530; /*事件管理器中断标志寄存器 B*/
volatile unsigned int *EVBIFRC =(volatile unsigned int *)0x7531; /*事件管理器中断标志寄存器 C*/
/*----------------------------------------------------------------------------------------------------------------------------------------------------
;常量的定义
;----------------------------------------------------------------------------------------------------------------------------------------------------
;数据空间
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
#define B2_SADDR 0x0060 /* 块B2的开始地址*/
#define B2_EADDR 0x007F /*块B2的结束地址*/
#define B0_SADDR 0x0200 /* 块B0的开始地址*/
#define B0_EADDR 0x02FF /*块B0的结束地址*/
#define B1_SADDR 0x0300 /* 块B1的开始地址*/
#define B1_EADDR 0x03FF /*块B1的结束地址*/
#define SARAM 0x0800 /*SARAM的开始地址(0800h~0FFFh)*/
#define EXTDATA 0x8000 /*外部的数据空间的开始地址*/
/*经常用到的数据页
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
#define DP_B2 0 /*页0数据空间*/
#define DP_B01 4 /*页0数据空间*/
#define DP_B02 5 /*页0数据空间*/
#define DP_B11 6 /*页0数据空间*/
#define DP_B12 7 /*页0数据空间*/
#define DP_SARAM1 16 /*页0数据空间*/
#define DP_PF1 224 /*页0数据空间*/
#define DP_PF2 225 /*页0数据空间*/
#define DP_PF3 226 /*页0数据空间*/
#define DP_PF4 227 /*页0数据空间*/
#define DP_PF5 228 /*页0数据空间*/
#define DP_EVA 232 /*页0数据空间*/
#define DP_EVB 234 /*页0数据空间*/
#define DP_EXT1 256 /*页0数据空间*/
/*位测试指令的位代码(BIT)
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
#define BIT15 0 /* 位代码15*/
#define BIT14 1 /* 位代码14*/
#define BIT13 2 /*位代码13*/
#define BIT12 3 /* 位代码12*/
#define BIT11 4 /*位代码11*/
#define BIT10 5 /* 位代码10*/
#define BIT9 6 /* 位代码9*/
#define BIT8 7 /*位代码8*/
#define BIT7 8 /* 位代码7*/
#define BIT6 9 /* 位代码6/
#define BIT5 10 /*位代码5*/
#define BIT4 11 /*位代码4*/
#define BIT3 12 /*位代码3*/
#define BIT2 13 /*位代码2*/
#define BIT1 14 /*位代码1*/
#define BIT0 15 /*位代码 0*/
/*用SBIT0和SBIT1宏屏蔽位
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
#define B15_MSK 0x8000 /*位屏蔽15*/
#define B14_MSK 0x4000 /*位屏蔽14*/
#define B13_MSK 0x2000 /*位屏蔽13*/
#define B12_MSK 0x1000 /*位屏蔽12*/
#define B11_MSK 0x0800 /*位屏蔽11*/
#define B10_MSK 0x0400 /*位屏蔽10*/
#define B9_MSK 0x0200 /*位屏蔽9*/
#define B8_MSK 0x0100 /*位屏蔽8*/
#define B7_MSK 0x0080 /*位屏蔽7*/
#define B6_MSK 0x0040 /*位屏蔽6*/
#define B5_MSK 0x0020 /*位屏蔽5*/
#define B4_MSK 0x0010 /*位屏蔽4*/
#define B3_MSK 0x0008 /*位屏蔽3*/
#define B2_MSK 0x0004 /*位屏蔽2*/
#define B1_MSK 0x0002 /*位屏蔽1*/
#define B0_MSK 0x0001 /*位屏蔽0*/
/*看门狗定时器复位字符串
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
#define wd_rst_1 0x0055
#define wd_rst_2 0x00AA
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -