50 #ifndef MP3_WTV020SD_H_ 51 #define MP3_WTV020SD_H_ 55 #define MP3_WTV020SD_ERROR -1 56 #define MP3_WTV020SD_SUCCESS 0x00 57 #define MP3_WTV020SD_GPIO_MODE 0x01 58 #define MP3_WTV020SD_LINE_MODE 0x02 59 #define MP3_WTV020SD_IDLE 0x00 60 #define MP3_WTV020SD_BUSY 0x0F 62 #define MP3_WTV020SD_PLAY_PAUSE_VAL 0xFFFE 63 #define MP3_WTV020SD_STOP_VAL 0xFFFF 64 #define MP3_WTV020SD_VOLUME_MIN 0xFFF0 65 #define MP3_WTV020SD_VOLUME_MAX 0xFFF7 67 #define MP3_USEC_DELAY 1000 68 #define MP3_USEC_CMD_DELAY 100 69 #define MP3_USEC_RESET_DELAY ((MP3_USEC_DELAY) * 30) 71 #define MP3_TRACK_BASE 0 int mp3_wtv020sd_reset(void)
Trigger a module reset.
int mp3_wtv020sd_sync_play(uint16_t track)
Plays the selected track and waits until it stops.
int mp3_wtv020sd_pause(void)
Pauses the current track.
int mp3_wtv020sd_async_play(uint16_t track)
Plays the selected track and returns immediately.
int mp3_wtv020sd_gpio_play(void)
Function to play a current track.
int mp3_wtv020sd_config(uint8_t mode)
Init function for the MP3 driver.
int mp3_wtv020sd_busy(void)
Get the current status of the device (playing/stopped)
int mp3_wtv020sd_gpio_next(void)
Advances and play the next track, wraps over the playlist.
int mp3_wtv020sd_stop(void)
Stops the current track.
int mp3_wtv020sd_gpio_stop(void)
Function to stop a current track.