📄 f2407regs_c.h
字号:
/*头文件F2407REGS_C.H*/
ioport unsigned portFFFF;
#define WSGR portFFFF
/*全局变量寄存器和CPU中断寄存器*/
volatile unsigned int *IMR = (volatile unsigned int *)0x0004;/*中断屏蔽寄存器*/
volatile unsigned int *GREG = (volatile unsigned int *)0x0005;/*全局变量定位寄存器*/
volatile unsigned int *IFR =(volatile unsigned int *)0x0006;/*中断标志寄存器*/
volatile unsigned int *PIRQR0 = (volatile unsigned int *)0x7010;/*外设中断请求寄存器0*/
volatile unsigned int *PIRQR1 = (volatile unsigned int *)0x7011;/*外设中断请求寄存器1*/
volatile unsigned int *PIRQR2 = (volatile unsigned int *)0x7012;/*外设中断请求寄存器2*/
volatile unsigned int *PIACKR0 = (volatile unsigned int *)0x7014;/*外设中断应答寄存器0*/
volatile unsigned int *PIACKR1 = (volatile unsigned int *)0x7015;/*外设中断应答寄存器1*/
volatile unsigned int *PIACKR2 = (volatile unsigned int *)0x7016;/*外设中断应答寄存器2*/
volatile unsigned int *SCSR1 = (volatile unsigned int *)0x7018;/*系统控制寄存器1*/
volatile unsigned int *SCSR2 = (volatile unsigned int *)0x7019;/*系统控制寄存器2*/
volatile unsigned int *DINR = (volatile unsigned int *)0x701C;/*系统模块状态寄存器*/
volatile unsigned int *PIVR = (volatile unsigned int *)0x701E;/*系统中断矢量寄存器,最近一次被应答的外设中断*/
/*WD程序监视控制器*/
volatile unsigned int *WDCNT = (volatile unsigned int *)0x7023;
volatile unsigned int *WDKEY = (volatile unsigned int *)0x7025;
volatile unsigned int *WDCR = (volatile unsigned int *)0x7029;
/*SCI寄存器*/
volatile unsigned int *SCICCR = (volatile unsigned int *)0x7050 ;/*SCI Comms Control Reg*/
volatile unsigned int *SCICTL1 = (volatile unsigned int *)0x7051 ;/*SCI Control Reg 1*/
volatile unsigned int *SCIHBAUD = (volatile unsigned int *)0x7052 ;/*SCI Baud rate control*/
volatile unsigned int *SCILBAUD = (volatile unsigned int *)0x7053 ;/*SCI Baud rate control*/
volatile unsigned int *SCICTL2 = (volatile unsigned int *)0x7054;/*SCI Control Reg 2*/
volatile unsigned int *SCIRXST = (volatile unsigned int *)0x7055;/*SCI Receive status reg*/
volatile unsigned int *SCIRXEMU = (volatile unsigned int *)0x7056;/*SCI EMU data buffer*/
volatile unsigned int *SCIRXBUF = (volatile unsigned int *)0x7057;/*SCI Receive data buffer*/
volatile unsigned int *SCITXBUF = (volatile unsigned int *)0x7059;/*SCI Transmit data buffer*/
volatile unsigned int *SCIPRI = (volatile unsigned int *)0x705F;/*SCI Priority control reg*/
/*I/O控制寄存器*/
volatile unsigned int *MCRA = (volatile unsigned int *)0x7090 ;/*I/O Mux Control Reg A*/
volatile unsigned int *MCRB = (volatile unsigned int *)0x7092 ;/*I/O Mux Control Reg B*/
volatile unsigned int *MCRC = (volatile unsigned int *)0x7094 ; /*Output control C (X240x only)*/
volatile unsigned int *PADATDIR = (volatile unsigned int *)0x7098 ;/* I/O port A Data & Direction*/
volatile unsigned int *PBDATDIR = (volatile unsigned int *)0x709A ;/* I/O port B Data & Direction*/
volatile unsigned int *PCDATDIR = (volatile unsigned int *)0x709C ; /*I/O port C Data & Direction*/
volatile unsigned int *PDDATDIR = (volatile unsigned int *)0x709E ;/*I/O port D Data & Direction reg*/
volatile unsigned int *PEDATDIR = (volatile unsigned int *)0x7095 ; /*I/O port D Data & Direction*/
volatile unsigned int *PFDATDIR = (volatile unsigned int *)0x7096 ;/* I/O port D Data & Direction*/
/*A/D寄存器*/
volatile unsigned int *ADCCTRL1 = (volatile unsigned int *)0x70A0 ;/*ADC Control reg 1*/
volatile unsigned int *ADCCTRL2 = (volatile unsigned int *)0x70A1 ;/*ADC Control reg 2*/
volatile unsigned int *MAXCONV = (volatile unsigned int *)0x70A2 ;/*Maximum conversions in sequence*/
volatile unsigned int *CHSELSEQ1 = (volatile unsigned int *)0x70A3 ;/*Channel select fields: Results 3,2,1,0*/
volatile unsigned int *CHSELSEQ2 = (volatile unsigned int *)0x70A4 ;/*Channel select fields: Results 7,6,5,4*/
volatile unsigned int *CHSELSEQ3 = (volatile unsigned int *)0x70A5 ;/*Channel select fields: Results 11,10,9,8*/
volatile unsigned int *CHSELSEQ4 = (volatile unsigned int *)0x70A6 ;/*Channel select fields: Results 15,14,13,12*/
volatile unsigned int *AUTO_SEQ_SR = (volatile unsigned int *)0x70A7;/*auto-sequence status Register*/
volatile unsigned int *ADC_RESULT0 = (volatile unsigned int *)0x70A8 ;/*Conversion result 0*/
volatile unsigned int *ADC_RESULT1 = (volatile unsigned int *)0x70A9 ;/*Conversion result 1*/
volatile unsigned int *ADC_RESULT2 = (volatile unsigned int *)0x70AA ;/*Conversion result 2*/
volatile unsigned int *ADC_RESULT3 = (volatile unsigned int *)0x70AB ;/*Conversion result 3*/
volatile unsigned int *ADC_RESULT4 = (volatile unsigned int *)0x70AC ;/*Conversion result 4*/
volatile unsigned int *ADC_RESULT5 = (volatile unsigned int *)0x70AD ;/*Conversion result 5*/
volatile unsigned int *ADC_RESULT6 = (volatile unsigned int *)0x70AE ;/*Conversion result 6*/
volatile unsigned int *ADC_RESULT7 = (volatile unsigned int *)0x70AF ;/*Conversion result 7*/
volatile unsigned int *ADC_RESULT8 = (volatile unsigned int *)0x70B0;/*Conversion result 8*/
volatile unsigned int *ADC_RESULT9 = (volatile unsigned int *)0x70B1 ;/*Conversion result 9*/
volatile unsigned int *ADC_RESULT10 = (volatile unsigned int *)0x70B2 ;/*Conversion result 10*/
volatile unsigned int *ADC_RESULT11 = (volatile unsigned int *)0x70B3 ;/*Conversion result 11*/
volatile unsigned int *ADC_RESULT12 = (volatile unsigned int *)0x70B4 ;/*Conversion result 12*/
volatile unsigned int *ADC_RESULT13 = (volatile unsigned int *)0x70B5 ;/*Conversion result 13*/
volatile unsigned int *ADC_RESULT14 = (volatile unsigned int *)0x70B6 ;/*Conversion result 14*/
volatile unsigned int *ADC_RESULT15 = (volatile unsigned int *)0x70B7 ;/*Conversion result 15*/
volatile unsigned int *CALIBRATION = (volatile unsigned int *)0x70B8 ;/*Calibration register*/
/*通用定时器--事件管理器A*/
volatile unsigned int *GPTCONA = (volatile unsigned int *)0x7400 ;/* General Timer Control*/
volatile unsigned int *T1CNT = (volatile unsigned int *)0x7401 ; /*T1 Counter*/
volatile unsigned int *T1CMPR = (volatile unsigned int *)0x7402 ; /*T1 Compare Value*/
volatile unsigned int *T1PR = (volatile unsigned int *)0x7403; /*T1 Period*/
volatile unsigned int *T1CON = (volatile unsigned int *)0x7404 ;/* T1 Control*/
volatile unsigned int *T2CNT = (volatile unsigned int *)0x7405 ; /*T2 Counter*/
volatile unsigned int *T2CMPR = (volatile unsigned int *)0x7406; /*T2 Compare Value*/
volatile unsigned int *T2PR = (volatile unsigned int *)0x7407; /*T2 Period*/
volatile unsigned int *T2CON = (volatile unsigned int *)0x7408 ; /*T2 Control*/
/*比较单元--事件管理器A*/
volatile unsigned int *COMCONA = (volatile unsigned int *)0x7411 ; /*Compare Control*/
volatile unsigned int *ACTRA = (volatile unsigned int *)0x7413 ; /*Compare Output Action Control */
volatile unsigned int *DBTCONA = (volatile unsigned int *)0x7415 ; /*Dead Band Control*/
volatile unsigned int *CMPR1 = (volatile unsigned int *)0x7417 ; /*Compare Value 1*/
volatile unsigned int *CMPR2 = (volatile unsigned int *)0x7418 ; /*Compare Value 2*/
volatile unsigned int *CMPR3 = (volatile unsigned int *)0x7419 ; /*Compare Value 3*/
/*捕捉和正交编码--事件管理器A*/
volatile unsigned int *CAPCONA = (volatile unsigned int *)0x7420 ; /*Capture Control*/
volatile unsigned int *CAPFIFOA = (volatile unsigned int *)0x7422 ; /*Capture FIFO1-3/4 Status*/
volatile unsigned int *CAP1FIFO = (volatile unsigned int *)0x7423 ; /*Capture 1 FIFO Top*/
volatile unsigned int *CAP2FIFO = (volatile unsigned int *)0x7424 ; /*Capture 2 FIFO Top*/
volatile unsigned int *CAP3FIFO = (volatile unsigned int *)0x7425 ; /*Capture 3 FIFO Top*/
volatile unsigned int *CAP1FB0T = (volatile unsigned int *)0x7427 ; /*Capture 1 FIFO Bottom (240x only)*/
volatile unsigned int *CAP2FB0T = (volatile unsigned int *)0x7428; /*Capture 2 FIFO Bottom (240x only)*/
volatile unsigned int *CAP3FB0T = (volatile unsigned int *)0x7429 ; /*Capture 3 FIFO Bottom (240x only)*/
/*事件管理器A 中断控制寄存器*/
volatile unsigned int *EVAIMRA = (volatile unsigned int *)0x742C ; /*Group A Int Mask*/
volatile unsigned int *EVAIMRB = (volatile unsigned int *)0x742D ; /*Group B Int Mask*/
volatile unsigned int *EVAIMRC = (volatile unsigned int *)0x742E ; /*Group C Int Mask*/
volatile unsigned int *EVAIFRA = (volatile unsigned int *)0x742f ;/* Group A Int Flag*/
volatile unsigned int *EVAIFRB = (volatile unsigned int *)0x7430 ; /*Group B Int Flag*/
volatile unsigned int *EVAIFRC = (volatile unsigned int *)0x7431; /*Group C Int Flag*/
/*通用(GP)定时器配置--EVB*/
volatile unsigned int *GPTCONB = (volatile unsigned int *)0x7500 ; /*General Timer Control*/
volatile unsigned int *T3CNT = (volatile unsigned int *)0x7501 ;/* T1 Counter*/
volatile unsigned int *T3CMPR = (volatile unsigned int *)0x7502 ; /*T1 Comp Value*/
volatile unsigned int *T3PR = (volatile unsigned int *)0x7503 ; /*T1 Period*/
volatile unsigned int *T3CON = (volatile unsigned int *)0x7504 ; /*T1 Control*/
volatile unsigned int *T4CNT = (volatile unsigned int *)0x7505 ; /*T2 Counter*/
volatile unsigned int *T4CMPR = (volatile unsigned int *)0x7506 ; /*T2 Comp Value*/
volatile unsigned int *T4PR = (volatile unsigned int *)0x7507 ; /*T2 Period*/
volatile unsigned int *T4CON = (volatile unsigned int *)0x7508 ; /*T2 Control*/
/*比较单元寄存器--EVB*/
volatile unsigned int *COMCONB = (volatile unsigned int *)0x7511 ; /*Compare Control*/
volatile unsigned int *ACTRB = (volatile unsigned int *)0x7513 ; /*Compare Output Action Control*/
volatile unsigned int *DBTCONB = (volatile unsigned int *)0x7515 ; /*Dead Band Control*/
volatile unsigned int *CMPR4 = (volatile unsigned int *)0x7517 ; /*Comp Value 4*/
volatile unsigned int *CMPR5 = (volatile unsigned int *)0x7518 ; /*Comp Value 5*/
volatile unsigned int *CMPR6 = (volatile unsigned int *)0x7519 ; /*Comp Value 6*/
/*捕捉单元寄存器--EVB*/
volatile unsigned int *CAPCONB = (volatile unsigned int *)0x7520 ;/* Capture Control*/
volatile unsigned int *CAPFIFOB = (volatile unsigned int *)0x7522 ;/* Capture FIFO4-6 Status*/
volatile unsigned int *CAP4FIFO = (volatile unsigned int *)0x7523 ; /*Capture 4 FIFO Top*/
volatile unsigned int *CAP5FIFO = (volatile unsigned int *)0x7524 ; /*Capture 5 FIFO Top*/
volatile unsigned int *CAP6FIFO = (volatile unsigned int *)0x7525 ;/* Capture 6 FIFO Top*/
volatile unsigned int *CAP4FBOT = (volatile unsigned int *)0x7527 ; /*Capture 4 FIFO Bottom*/
volatile unsigned int *CAP5FBOT = (volatile unsigned int *)0x7528 ; /*Capture 5 FIFO Bottom*/
volatile unsigned int *CAP6FBOT = (volatile unsigned int *)0x7529 ; /*Capture 6 FIFO Bottom*/
/*事件管理器B 中断控制寄存器*/
volatile unsigned int *EVBIMRA = (volatile unsigned int *)0x742C ; /*Group A Int Mask*/
volatile unsigned int *EVBIMRB = (volatile unsigned int *)0x742D ; /*Group B Int Mask*/
volatile unsigned int *EVBIMRC = (volatile unsigned int *)0x742E ; /*Group C Int Mask*/
volatile unsigned int *EVBIFRA = (volatile unsigned int *)0x742F ; /*Group A Int Flag */
volatile unsigned int *EVBIFRB = (volatile unsigned int *)0x7430; /*Group B Int Flag*/
volatile unsigned int *EVBIFRC = (volatile unsigned int *)0x7431 ; /*Group C Int Flag*/
/*等待状态产生寄存器*/
/*数据存储器地址*/
#define B0_SADDR 0x0200/*lock B0 start address*/
#define B0_EADDR 0x02FF /*Block B0 end address*/
#define B1_SADDR 0x0400 /*Block B1 start address*/
#define B1_EADDR 0x04FF /*Block B1 end address*/
#define B2_SADDR 0x0060 /*Block B2 start address*/
#define B2_EADDR 0x007F /*Block B2 end address*/
#define XDATA_SADDR 0x8000
#define XDATA_EADDR 0xFFFF
/*经常使用的数据页*/
#define DP_B2 0
#define DP_B01 4
#define DP_B02 5
#define DP_B11 6
#define DP_B12 7
#define DP_SARAM1 16
#define DP_SARAM2 26
#define DP_SARAM3 18
#define DP_SARAM4 19
#define DP_PF2 225
#define DP_PF1 224
#define DP_PF3 226
#define DP_PF4 227
#define DP_PF5 228
#define DP_EVA 232
#define DP_EVB 234
/*位测试指令的位代码*/
#define BIT15 0
#define BIT14 1
#define BIT13 2
#define BIT12 3
#define BIT11 4
#define BIT10 5
#define BIT9 6
#define BIT8 7
#define BIT7 8
#define BIT6 9
#define BIT5 10
#define BIT4 11
#define BIT3 12
#define BIT2 13
#define BIT1 14
#define BIT0 15
/*用SBIT0和SBIT1宏屏蔽位*/
#define B15_MSK 0x8000 /*Bit Mask for 15*/
#define B14_MSK 0x4000/*Bit Mask for 14*/
#define B13_MSK 0x2000 /*Bit Mask for 13*/
#define B12_MSK 0x1000 /*Bit Mask for 12*/
#define B11_MSK 0x0800 /*Bit Mask for 11*/
#define B10_MSK 0x0400 /*Bit Mask for 10*/
#define B9_MSK 0x0200 /*Bit Mask for 9*/
#define B8_MSK 0x0100 /*Bit Mask for 8*/
#define B7_MSK 0x0080 /*Bit Mask for 7*/
#define B6_MSK 0x0040 /*Bit Mask for 6*/
#define B5_MSK 0x0020 /*Bit Mask for 5*/
#define B4_MSK 0x0010 /*Bit Mask for 4*/
#define B3_MSK 0x0008 /*Bit Mask for 3*/
#define B2_MSK 0x0004 /*Bit Mask for 2*/
#define B1_MSK 0x0002 /*Bit Mask for 1*/
#define B0_MSK 0x0001 /*Bit Mask for 0*/
/*自定义变量*/
volatile unsigned int *test1 = (volatile unsigned int *)0xFFB1;
volatile unsigned int *test2 = (volatile unsigned int *)0xFFA0;
volatile unsigned int *test3 = (volatile unsigned int *)0x0301;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -