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

📄 mcbsp1ctltx.c

📁 CHP 2 - Real-Time Digital Signal Processing: Implementations and Applications, Second Edition by Sen
💻 C
字号:
// 
//  Project: Experiment 2.10.6 Configure and Use McBSP- Chapter 2 
//  File name: mcbsp1CtlTx.c   
//  Function(s): mcbsp1Tx()        
//
//  Description: This function sends control command and data via McBSP1 DXR 
//
//  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(mcbsp1CtlTx,    ".text:example:mcbsp1CtlTx");

void mcbsp1CtlTx(ioport volatile unsigned short *reg, short regValue)
{
  ioport volatile unsigned short*p;      
        
  p = (ioport volatile unsigned short*)(McBSP_BASE+McBSP1_OFFSET);           

  // Wait until XRDY is set before writing to DXR to reset AIC23
  while ( (*(p+SPCR2) & XRDY_BIT) == 0) ;
  // Using DXR to write to AIC initial value to set up AIC23
  *reg = regValue;  
}

⌨️ 快捷键说明

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