📄 lf2407.h
字号:
/*************************************************************************
/* File name: 2407c.h
/*
/* Description: 240x register definitions, Bit codes for BIT instruction
/*************************************************************************
/* 240x CPU core registers*/
/*中断屏蔽寄存器*/
volatile unsigned int *IMR =(volatile unsigned int *)0x004;
/*全局变量定位寄存器*/
volatile unsigned int *GREG =(volatile unsigned int *)0x0005;
/*中断标志寄存器*/
volatile unsigned int *IFR =(volatile unsigned int *)0x0006;
/*分析断点*/
volatile unsigned int *ABRPT =(volatile unsigned int *)0x001f;
ioport unsigned int portFFFF;
#define WSGR portFFFF
/*系统模块寄存器*/
/************************************************************************/
/*外围中断请求寄存器0*/
volatile unsigned int *PIRQR0 =(volatile unsigned int *)0x7010;
/*外围中断请求寄存器1*/
volatile unsigned int *PIRQR1 =(volatile unsigned int *)0x7011;
/*外围中断请求寄存器2*/
volatile unsigned int *PIRQR2 =(volatile unsigned int *)0x7012;
/*外围中断应答寄存器0*/
volatile unsigned int *PIACKR0 =(volatile unsigned int *)0x7014;
/*外围中断应答寄存器1*/
volatile unsigned int *PIACKR1 =(volatile unsigned int *)0x7015;
/*外围中断应答寄存器2*/
volatile unsigned int *PIACKR2 =(volatile unsigned int *)0x7016;
/*系统控制和状态寄存器1*/
volatile unsigned int *SCSR1 =(volatile unsigned int *)0x7018;
/*系统控制和状态寄存器2*/
volatile unsigned int *SCSR2 =(volatile unsigned int *)0x7019;
/*期间识别寄存器*/
volatile unsigned int *DIN =(volatile unsigned int *)0x701c;
/*外围中断向量寄存器*/
volatile unsigned int *PIVR =(volatile unsigned int *)0x701e;
/*看门狗/实时中断/PLL锁相环寄存器*/
/**************************************************************************/
/*看门狗计数寄存器*/
volatile unsigned int *WDCNTR =(volatile unsigned int *)0x7023;
/*看门狗KEY寄存器*/
volatile unsigned int *WDKEY =(volatile unsigned int *)0x7025;
/*看门狗控制寄存器*/
volatile unsigned int *WDCR =(volatile unsigned int *)0x7029;
/*外围串行口(SPI)寄存器*/
/****************************************************************************/
/*SPI配置控制寄存器1*/
volatile unsigned int *SPICCR =(volatile unsigned int *)0x7040;
/*SPI运行控制寄存器2*/
volatile unsigned int *SPICTL =(volatile unsigned int *)0x7041;
/*SPI状态寄存器*/
volatile unsigned int *SPISTS =(volatile unsigned int *)0x7042;
/*SPI波特率控制寄存器*/
volatile unsigned int *SPIBRR =(volatile unsigned int *)0x7044;
/*SPI防真缓冲寄存器*/
volatile unsigned int *SPIEMU =(volatile unsigned int *)0x7046;
/*SPI串行输入缓冲寄存器*/
volatile unsigned int *SPIRXBUF=(volatile unsigned int *)0x7047;
/*SPI串行输出缓冲寄存器*/
volatile unsigned int *SPITXBUF=(volatile unsigned int *)0x7048;
/*串行数据寄存器*/
volatile unsigned int *SPIDAT =(volatile unsigned int *)0x7049;
/*SPI端口控制寄存器1*/
volatile unsigned int *SPIPC1 =(volatile unsigned int *)0x704d;
/*SPI端口控制寄存器2*/
volatile unsigned int *SPIPC2 =(volatile unsigned int *)0x704e;
/*SPI优先级控制寄存器*/
volatile unsigned int *SPIPRI =(volatile unsigned int *)0x7023;
/*串行通讯接口寄存器*/
/****************************************************************************/
/*SCI通讯控制寄存器*/
volatile unsigned int *SCICCR =(volatile unsigned int *)0x7050;
/*SCI控制寄存器1*/
volatile unsigned int *SCICTL1 =(volatile unsigned int *)0x7051;
/*SCI波特率控制寄存器高位*/
volatile unsigned int *SCIHBAUD=(volatile unsigned int *)0x7052;
/*SCI波特率控制寄存器低位*/
volatile unsigned int *SCILBAUD=(volatile unsigned int *)0x7053;
/*SCI控制寄存器2*/
volatile unsigned int *SCICTL2 =(volatile unsigned int *)0x7054;
/*SCI接收状态寄存器*/
volatile unsigned int *SCIRXST =(volatile unsigned int *)0x7055;
/*SCI EMU数据缓冲寄存器*/
volatile unsigned int *SCIRXEMU=(volatile unsigned int *)0x7056;
/*SCI接收数据缓冲寄存器*/
volatile unsigned int *SCIRXBUF=(volatile unsigned int *)0x7057;
/*SCI发送数据缓冲寄存器*/
volatile unsigned int *SCITXBUF=(volatile unsigned int *)0x7059;
/*SCI优先级控制寄存器*/
volatile unsigned int *SCIPRI =(volatile unsigned int *)0x705f;
/*外围中断配置寄存器*/
/*************************************************************************/
/*INT1配置寄存器*/
volatile unsigned int *XINT1CR =(volatile unsigned int *)0x7070;
/*INT2配置寄存器*/
volatile unsigned int *XINT2CR =(volatile unsigned int *)0x7071;
/*数字IO控制寄存器*/
/***************************************************************************/
/*I/O复用控制寄存器A*/
volatile unsigned int *MCRA =(volatile unsigned int *)0x7090;
/*I/O复用控制寄存器B*/
volatile unsigned int *MCRB =(volatile unsigned int *)0x7092;
/*I/O复用控制寄存器C*/
volatile unsigned int *MCRC =(volatile unsigned int *)0x7094;
/*输入状态寄存器A*/
/*volatile unsigned int *IPSRA =(volatile unsigned int *)0x7094; */
/*输入状态寄存器B*/
/*volatile unsigned int *IPSRB =(volatile unsigned int *)0x7096;*/
/*IO端口A数据和方向控制寄存器*/
volatile unsigned int *PADATDIR=(volatile unsigned int *)0x7098;
/*IO端口B数据和方向控制寄存器*/
volatile unsigned int *PBDATDIR=(volatile unsigned int *)0x709a;
/*IO端口C数据和方向控制寄存器*/
volatile unsigned int *PCDATDIR=(volatile unsigned int *)0x709c;
/*IO端口D数据和方向控制寄存器*/
volatile unsigned int *PDDATDIR=(volatile unsigned int *)0x709e;
/*IO端口E数据和方向控制寄存器*/
volatile unsigned int *PEDATDIR=(volatile unsigned int *)0x7095;
/*IO端口F数据和方向控制寄存器*/
volatile unsigned int *PFDATDIR=(volatile unsigned int *)0x7096;
/*ADC寄存器定义*/
/*****************************************************************************/
/*ADC控制寄存器1*/
volatile unsigned int *ADCTRL1 =(volatile unsigned int *)0x70a0;
/*ADC控制寄存器2*/
volatile unsigned int *ADCTRL2 =(volatile unsigned int *)0x70a1;
/*最大转换通道寄存器*/
volatile unsigned int *MAXCONV =(volatile unsigned int *)0x70a2;
/*通道选择域:结果3 2 1 0*/
volatile unsigned int *CHSELSEQ1 =(volatile unsigned int *)0x70a3;
/*通道选择域:结果7 6 5 4*/
volatile unsigned int *CHSELSEQ2 =(volatile unsigned int *)0x70a4;
/*通道选择域:结果11 10 9 8*/
volatile unsigned int *CHSELSEQ3 =(volatile unsigned int *)0x70a5;
/*通道选择域:结果15 14 13 12*/
volatile unsigned int *CHSELSEQ4 =(volatile unsigned int *)0x70a6;
/*自动排序状态寄存器*/
volatile unsigned int *AUTO_SEQ_SR=(volatile unsigned int *)0x70a7;
/*转换结果寄存器0*/
volatile unsigned int *RESULT0 =(volatile unsigned int *)0x70a8;
/*转换结果寄存器1*/
volatile unsigned int *RESULT1 =(volatile unsigned int *)0x70a9;
/*转换结果寄存器2*/
volatile unsigned int *RESULT2 =(volatile unsigned int *)0x70aa;
/*转换结果寄存器3*/
volatile unsigned int *RESULT3 =(volatile unsigned int *)0x70ab;
/*转换结果寄存器4*/
volatile unsigned int *RESULT4 =(volatile unsigned int *)0x70ac;
/*转换结果寄存器5*/
volatile unsigned int *RESULT5 =(volatile unsigned int *)0x70ad;
/*转换结果寄存器6*/
volatile unsigned int *RESULT6 =(volatile unsigned int *)0x70ae;
/*转换结果寄存器7*/
volatile unsigned int *RESULT7 =(volatile unsigned int *)0x70af;
/*转换结果寄存器8*/
volatile unsigned int *RESULT8 =(volatile unsigned int *)0x70b0;
/*转换结果寄存器9*/
volatile unsigned int *RESULT9 =(volatile unsigned int *)0x70b1;
/*转换结果寄存器10*/
volatile unsigned int *RESULT10 =(volatile unsigned int *)0x70b2;
/*转换结果寄存器11*/
volatile unsigned int *RESULT11 =(volatile unsigned int *)0x70b3;
/*转换结果寄存器12*/
volatile unsigned int *RESULT12 =(volatile unsigned int *)0x70b4;
/*转换结果寄存器13*/
volatile unsigned int *RESULT13 =(volatile unsigned int *)0x70b5;
/*转换结果寄存器14*/
volatile unsigned int *RESULT14 =(volatile unsigned int *)0x70b6;
/*转换结果寄存器15*/
volatile unsigned int *RESULT15 =(volatile unsigned int *)0x70b7;
/*校准寄存器*/
volatile unsigned int *CALIBRATION =(volatile unsigned int *)0x70b8;
/*局部控制网络(CAN)寄存器*/
/****************************************************************************/
/*邮包方向/使能寄存器*/
volatile unsigned int *CANMDER =(volatile unsigned int *)0x7100;
/*发送控制寄存器*/
volatile unsigned int *CANTCR =(volatile unsigned int *)0x7101;
/*接收控制寄存器*/
volatile unsigned int *CANRCR =(volatile unsigned int *)0x7102;
/*主动控制寄存器*/
volatile unsigned int *CANMCR =(volatile unsigned int *)0x7103;
/*位配置寄存器2*/
volatile unsigned int *CANBCR2 =(volatile unsigned int *)0x7104;
/*位配置寄存器1*/
volatile unsigned int *CANBCR1 =(volatile unsigned int *)0x7105;
/*错误状态寄存器*/
volatile unsigned int *CANESR =(volatile unsigned int *)0x7106;
/*全局状态寄存器*/
volatile unsigned int *CANGSR =(volatile unsigned int *)0x7107;
/*CAN错误计数寄存器*/
volatile unsigned int *CANCEC =(volatile unsigned int *)0x7108;
/*CAN中断标志寄存器*/
volatile unsigned int *CANIFR =(volatile unsigned int *)0x7109;
/*CAN 中断屏蔽寄存器*/
volatile unsigned int *CANIMR =(volatile unsigned int *)0x710a;
/*局部接收屏蔽寄存器0高位*/
volatile unsigned int *CANLAM0H =(volatile unsigned int *)0x710b;
/*局部接收屏蔽寄存器0低位*/
volatile unsigned int *CANLAM0L =(volatile unsigned int *)0x710c;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -