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

📄 main.c

📁 DSP+MP3+USB+FAT12的所有源程序(C语言编写)
💻 C
字号:


#include "general.h"

/*++

Copyright (c) 2004 GoldInfo Technology Co., Ltd.

Module Name:

       main.c

Abstract:

        Module related to main routine

Environment:

        ccs2.0 IDE

Revision History:

        01/5/20014      Mikal   created

--*/
//*****************************************************************************




void main(void)
{
    
    INITIO_initialize();
       
     while(1) 
     { 
          D12_USB_ISR();
     }
  
   

}


//*****************************************************************************
/*++

Routine Description:

        process all function module initilization

Arguments:

        none

Return Value:

        none

--*/

void INITIO_initialize(void)
{ 
   
    int i ,j=0;


       DSP_Init_Set();
       
 #if(0)      
       INITIO_FAT_NF_Data(); // the first time do this function module
 #endif 
       
    
	   D12_ReadChipID();
	
       D12_SetAddressEnable(0,1); // enable the address,
	
	   D12_SetEndpointEnable(1);	//enable the endpoint
	   
	
       D12_SetMode(0x0e,0x4b); //disconncet the USB
       
	   for (i=0;i<1000;i++)
       {
	      j=j+1;
	   } 
	  
    
	   D12_SetMode(0x1e,0x4b); //connect USB
  
       DSP_Init_Int();

}


//*****************************************************************************
/*++

Routine Description:

        process the FAT and Nand flash  data initialize imodule 

Arguments:

        none

Return Value:

        none

--*/
void INITIO_FAT_NF_Data(void)
{
    int i ;


    
       for(i=0;i<1000;i++)
       {
          Erase_NFlash(i);
       }
       
       FAT12_MBRDataSet();


}


⌨️ 快捷键说明

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