30 lines
581 B
C
30 lines
581 B
C
|
#ifndef __MP3PLAYER_H__
|
|||
|
#define __MP3PLAYER_H__
|
|||
|
|
|||
|
#include <inttypes.h>
|
|||
|
#include "./led/bsp_led.h"
|
|||
|
|
|||
|
#define Delay_ms HAL_Delay
|
|||
|
|
|||
|
#define SAI_AUDIOFREQ_DEFAULT SAI_AUDIO_FREQUENCY_8K
|
|||
|
|
|||
|
/* ״̬ */
|
|||
|
enum
|
|||
|
{
|
|||
|
STA_IDLE = 0, /* <20><><EFBFBD><EFBFBD>״̬ */
|
|||
|
STA_PLAYING, /* <20><><EFBFBD><EFBFBD>״̬ */
|
|||
|
STA_ERR, /* error */
|
|||
|
};
|
|||
|
|
|||
|
typedef struct
|
|||
|
{
|
|||
|
uint8_t ucVolume; /* <20><>ǰ<EFBFBD><C7B0><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> */
|
|||
|
uint8_t ucStatus; /* ״̬<D7B4><CCAC>0<EFBFBD><30>ʾ<EFBFBD><CABE><EFBFBD><EFBFBD><EFBFBD><EFBFBD>1<EFBFBD><31>ʾ<EFBFBD><CABE><EFBFBD><EFBFBD><EFBFBD>У<EFBFBD>2 <20><><EFBFBD><EFBFBD> */
|
|||
|
uint32_t ucFreq; /* <20><><EFBFBD><EFBFBD>Ƶ<EFBFBD><C6B5> */
|
|||
|
}MP3_TYPE;
|
|||
|
|
|||
|
void mp3PlayerDemo(const char *mp3file);
|
|||
|
void MusicPlayer_SAI_DMA_TX_Callback(void);
|
|||
|
#endif /* __MP3PLAYER_H__ */
|
|||
|
|