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

📄 lf2407.h

📁 DSP2407上实现数控IO功能的C语言源程序
💻 H
📖 第 1 页 / 共 3 页
字号:
/**********************************************
;这是c语言编写dsp程序时的头文件
;**********************************************/

/*******片内外围寄存器定义*******************/

/*内核寄存器***********************************/

/***中断屏蔽寄存器****************************/

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 *ABRPT =(volatile unsigned int *)0x01f;

ioport unsigned 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;

/*****看门狗/实时中断(RTI)和锁相环(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配置控制寄存器************************************************/
volatile unsigned int *SPICCR   =(volatile unsigned int *)0x7040;
/****SPI运行控制寄存器***********************************************/
volatile unsigned int *SPICRL   =(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;
/*****SPI串行数据寄存器********************************************/
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 *)0x704F;

/*****串行通讯接口(SCI)控制器*******************************************/
/****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;

/***************************数字I/O控制寄存器*****************************/
/******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;
/******I/O端口A数据和方向控制寄存器******************************/
volatile unsigned int *PADATDIR   =(volatile unsigned int *)0x7098;
/******I/O端口B数据和方向控制寄存器******************************/
volatile unsigned int *PBDATDIR   =(volatile unsigned int *)0x709A;
/******I/O端口C数据和方向控制寄存器******************************/
volatile unsigned int *PCDATDIR   =(volatile unsigned int *)0x709C;
/******I/O端口D数据和方向控制寄存器******************************/
volatile unsigned int *PDDATDIR   =(volatile unsigned int *)0x709E;
/******I/O端口E数据和方向控制寄存器******************************/
volatile unsigned int *PEDATDIR   =(volatile unsigned int *)0x7095;
/******I/O端口F数据和方向控制寄存器******************************/
volatile unsigned int *PFDATDIR   =(volatile unsigned int *)0x7096;


/*************************ADC寄存器定义*************************************/
/******ADC控制寄存器1******************************/
volatile unsigned int *ADCTRL1   =(volatile unsigned int *)0x70A0;
/******ADC控制寄存器1******************************/
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;

⌨️ 快捷键说明

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