main.c
来自「DSP+MP3+USB+FAT12的所有源程序(C语言编写)」· C语言 代码 · 共 131 行
C
131 行
#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 + =
减小字号Ctrl + -
显示快捷键?