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

📄 initsport.c

📁 ADI 公司的DSP ADSP21369 EZ-KIT LITE开发板的全部源代码
💻 C
字号:
///////////////////////////////////////////////////////////////////////////////////////
//NAME:     initSPORT.c 
//DATE:     7/15/04
//PURPOSE:  Talkthrough framework for sending and receiving samples to the AD1835.
//
//
////////////////////////////////////////////////////////////////////////////////////////
#include <cdef21364.h>
#include <def21364.h>




//////////////////////////////////////////////////////////////////////////////
// void InitSPORT(void)
// 
// PURPOSE:		Initialise the SPORT 
//////////////////////////////////////////////////////////////////////////////
void InitSPORT(void)
{
	//============================================================
	//
	// Make sure that the multichannel mode registers are cleared
	//
	//============================================================
    *pSPMCTL01 = 0;
    *pSPMCTL23 = 0;

    *pSPCTL0 = 0 ;
    *pSPCTL1 = 0 ;
    *pSPCTL2 = 0 ;

	//============================================================
	//
	// Configure SPORT 0 for input from ADC
	//
	//    BHD = Buffer hang disable
	//    OPMODE = I2S mode
	//    SLEN24 = 24 bit of data in each 32-bit word
	//    SPEN_A = Enable data channel A
	//
	//------------------------------------------------------------
    *pSPCTL0 = (BHD | OPMODE | SLEN24 | SPEN_A);
}


⌨️ 快捷键说明

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