Contiki-NG
|
platforms More...
Files | |
file | mp3-wtv020sd.c |
Header file for the MP3 WTV020SD driver. | |
file | mp3-wtv020sd.h |
Header file for the MP3 WTV020SD driver. | |
Functions | |
int | mp3_wtv020sd_config (uint8_t mode) |
Init function for the MP3 driver. | |
int | mp3_wtv020sd_gpio_play (void) |
Function to play a current track. | |
int | mp3_wtv020sd_gpio_stop (void) |
Function to stop a current track. | |
int | mp3_wtv020sd_gpio_next (void) |
Advances and play the next track, wraps over the playlist. | |
int | mp3_wtv020sd_busy (void) |
Get the current status of the device (playing/stopped) | |
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_async_play (uint16_t track) |
Plays the selected track and returns immediately. | |
int | mp3_wtv020sd_stop (void) |
Stops the current track. | |
int | mp3_wtv020sd_pause (void) |
Pauses the current track. | |
platforms
Driver to control the MP3 WTV020SD board in MP3 mode (GPIO based) and the 2-line serial mode (CLK/DI). Loop Mode and Key Modes not implemented. More product information available at: http://avrproject.ru/chasy-budilnik/WTV020SD.pdf An example on how to wire with a sound power amplifier and speakers at http://www.hackster.io/zolertia Based on the Arduino Wtv020sd16p library
Driver to control the MP3 WTV020SD board in MP3 mode (GPIO based) and the 2-line serial mode (CLK/DI). Loop Mode and Key Modes not implemented. More product information available at: http://avrproject.ru/chasy-budilnik/WTV020SD.pdf An example on how to wire with a sound power amplifier and speakers at http://www.hackster.io/zolertia
int mp3_wtv020sd_async_play | ( | uint16_t | track | ) |
Plays the selected track and returns immediately.
track | forwards and play the selected track, starting from MP3_TRACK_BASE (0000.ad4) up to MP3_TRACK_BASE + 511 (0511.ad4) |
Definition at line 225 of file mp3-wtv020sd.c.
int mp3_wtv020sd_busy | ( | void | ) |
Get the current status of the device (playing/stopped)
Definition at line 185 of file mp3-wtv020sd.c.
References GPIO_READ_PIN.
Referenced by mp3_wtv020sd_sync_play().
int mp3_wtv020sd_config | ( | uint8_t | mode | ) |
Init function for the MP3 driver.
Configures the pins required to operate in either driver mode
mode | drive the board using GPIOs or the two-line mode, using either MP3_WTV020SD_GPIO_MODE or MP3_WTV020SD_LINE_MODE |
Definition at line 120 of file mp3-wtv020sd.c.
References GPIO_SET_INPUT, GPIO_SET_OUTPUT, GPIO_SET_PIN, and GPIO_SOFTWARE_CONTROL.
int mp3_wtv020sd_gpio_next | ( | void | ) |
Advances and play the next track, wraps over the playlist.
Definition at line 173 of file mp3-wtv020sd.c.
References clock_delay_usec(), GPIO_CLR_PIN, and GPIO_SET_PIN.
int mp3_wtv020sd_gpio_play | ( | void | ) |
Function to play a current track.
Definition at line 153 of file mp3-wtv020sd.c.
References GPIO_CLR_PIN.
int mp3_wtv020sd_gpio_stop | ( | void | ) |
Function to stop a current track.
Definition at line 163 of file mp3-wtv020sd.c.
References GPIO_SET_PIN.
int mp3_wtv020sd_pause | ( | void | ) |
Pauses the current track.
Definition at line 245 of file mp3-wtv020sd.c.
int mp3_wtv020sd_reset | ( | void | ) |
Trigger a module reset.
Definition at line 198 of file mp3-wtv020sd.c.
References clock_delay_usec(), GPIO_CLR_PIN, and GPIO_SET_PIN.
int mp3_wtv020sd_stop | ( | void | ) |
Stops the current track.
Definition at line 235 of file mp3-wtv020sd.c.
int mp3_wtv020sd_sync_play | ( | uint16_t | track | ) |
Plays the selected track and waits until it stops.
track | forwards and play the selected track, starting from MP3_TRACK_BASE (0000.ad4) up to MP3_TRACK_BASE + 511 (0511.ad4) |
Definition at line 214 of file mp3-wtv020sd.c.
References mp3_wtv020sd_busy().