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

📄 main.c

📁 usoc在北京博创兴业有限公司的实验平台s3c2410上运行。 2. 各实验的全部源代码分别存放在各实验目录下面。
💻 C
字号:
/***************************************************************************\
	Copyright (c) 2004-2007 threewater@up-tech.com, All rights reserved.
	by threewter	2004.5.12
\***************************************************************************/
/***************************************************************************\
    #说明: C  main 函数,ucos-ii初始化等定义
	----------------------------------  Bug  --------------------------------------

	----------------------------------  TODO list  --------------------------------------

	----------------------------------修正--------------------------------------
	2004-5-12	创建

\***************************************************************************/

#include"../ucos-ii/includes.h"               /* uC/OS interface */
#include "../ucos-ii/add/osaddition.h"
#include "../inc/drivers.h"
#include "OSFile.h"
#include "../inc/sys/lib.h"
#include "../src/gui/gui.h"
#include "reg2410.h"
#include <string.h>
#include <stdio.h>

#pragma import(__use_no_semihosting_swi)  // ensure no functions that use semihosting 


/***************************************************************/
extern int song_position,song_size;
extern unsigned char song_data[];
U32 data_remain;

int mp3_input_read(unsigned char *buf, int len)
{  
   int l;
   int remain;

   remain=song_size - song_position;  //计算剩余数据  
  
   memcpy(buf, &song_data[song_position],l=(remain>=len)?len: remain);
   song_position+=l;                  //调整歌曲数据位置

   return l;    
}
int main(void)
{
 	ARMTargetInit();        // do target (uHAL based ARM system) initialisation //
  	ISR_Init();

	song_position=0;		    //当前要读的歌曲数据位置
    start_mp3_decode();
    Uart_Printf(0,"end\n"); 
    while(1);
   
	return 0;
}

⌨️ 快捷键说明

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