📄 mp3_contr.c
字号:
#include <mp3_contr.h>
#include <regsnd1.h>
Mp3_Reg_Init()
{
if(MP3_Switch == MP3_ON)
{
MP3CON = 0xBF;
}
else MP3CON = 0x3F;
}
MP3_Data_Input()
{
if ((MPFREQ == 1) && (MPBREQ == 1) == 1)
{
MP3DAT = MP3_Data;
}
}
MP3_Error_Del()
{
if(ERRLAY == 1)
{
//在LED上给出提示,读取下一首歌曲
}
if(ERRCRC == 1)
{
//在LED上给出提示,继续播放
}
if(ERRSYN == 1)
{
MP3_Data_Input(); //重新送入数据
}
}
MP3_Clk_Set()
{
if (MPVER == 1)
{
MP3CLK = 0;
}
else
{
MP3CLK = 1;
}
}
MP3_Audio_Contr()
{
MP3VOL = Key_Vol;
MP3VOR = Key_Vol;
MP3MED = Key_Med;
MP3TRE = Key_Tre;
MP3BAS = Key_Bas;
}
Mp3_AncData_Del()
{
//留出接口供调用
}
void MP3_Int_Del() interrupt 5 using 2
{
if(MPREQ == 1)
{
Mp3_Data_Input();
}
else if(MPANC == 1)
{
Mp3_AncData_Del();
}
else Mp3_Error_Del();
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -