📄 mcbspreset.c
字号:
//
// Project: Experiment 2.10.6 Configure and Use McBSP- Chapter 2
// File name: mcbspReset.c
// Function(s): mcbspReset()
//
// Description: This function resets the C5510 DSK McBSP registers
//
// For the book "Real Time Digital Signal Processing:
// Implementation and Application, 2nd Ed"
// By Sen M. Kuo, Bob H. Lee, and Wenshun Tian
// Publisher: John Wiley and Sons, Ltd
//
// Tools used: CCS v.2.12.07
// TMS320VC5510 DSK Rev-C
//
#include "mcbsp.h"
#pragma CODE_SECTION(mcbspReset, ".text:example:mcbspReset");
void mcbspReset(short mcbspx)
{
volatile short i;
ioport volatile unsigned short*p;
p = (ioport volatile unsigned short*)(McBSP_BASE+(mcbspx<<10));
for (i=0; i<31; i++) // Zero out all registers and set the bits below
{
*p++ = 0;
}
p = (ioport volatile unsigned short*)(McBSP_BASE+(mcbspx<<10)+SRGR2);
*p++ = 0x2000; // SRGR2 default to 0x2000
*p = 0x0001; // SRGR1 default to 0x0001
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -