rt-thread/bsp/stm32_radio/player_bg.h

31 lines
604 B
C
Raw Normal View History

#ifndef __PLAYER_BG_H__
#define __PLAYER_BG_H__
#include <rtthread.h>
enum PLAYER_REQUEST_TYPE
{
PLAYER_REQUEST_PLAY_SINGLE_FILE,
PLAYER_REQUEST_PLAY_LIST,
PLAYER_REQUEST_STOP,
};
struct player_request
{
enum PLAYER_REQUEST_TYPE type;
char fn[64];
};
/* get player background status */
rt_bool_t player_is_playing(void);
/* player background thread init */
void player_init(void);
/* send a stop request to player background thread */
void player_stop_req(void);
/* send a play request to player background thread */
void player_play_req(const char* fn);
#endif