main.c

来自「ADI 公司的DSP ADSP21262 EZ-KIT LITE开发板的全部源代」· C语言 代码 · 共 52 行

C
52
字号
///////////////////////////////////////////////////////////////////////////////////////
//NAME:     main.c (Block-based Talkthrough)
//DATE:     9/18/03
//PURPOSE:  Talkthrough framework for receiving SPDIF and sending samples to the AD1835.
//
//USAGE:    This file contains the main routine calls functions to set up the talkthrough
//          routine.
//
////////////////////////////////////////////////////////////////////////////////////////
#include "tt.h"

void SetupIRQ12(void);
void InitCS8416viaSPI(void);

void main(void)
{
 
	SetupIRQ12 () ;

    // Need to initialize DAI because the sport signals
    // need to be routed
    InitDAI();

    // Check ID of SPDIF to verify SPI communication
	int CS8416_DevID = ReadCS8416Register (0x7f);
	if ( CS8416_DevID != 0x27)
		{ while(1);}

    InitCS8416viaSPI();

    // This function will configure the codec on the kit
    Init1835viaSPI();

    // Finally setup the sport to receive / transmit the data
    InitSPORT();

    interrupt (SIG_SP0,TalkThroughISR);
    interrupt (SIG_SP1,SIG_IGN); //Tools Anomaly sets SP1 int with all Even SPORTS
    interrupt (SIG_IRQ1, Irq1ISR) ;
    interrupt (SIG_IRQ2, Irq2ISR) ;

    // Be in infinite loop and do nothing until done.
    for(;;)
    {
     while(blockReady)
          processBlock(src_pointer[int_cntr]);
    }

  
}

⌨️ 快捷键说明

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