User`s guide

Architecture
5-38 AT85C51SND3Bx Firmware User’s Guide
7691A–MP3–08/07
The USB module does not include public routines.
5.6.2 Player Interface
The Player module controls the audio features of the chip:
it interfaces the audio processor
it manages the playing of audio files (play, stop, pause, …)
In player module, only the bargraph feature can’t be immediatly executed, then this must
be executed via a command and event.
Table 5-14. Player commands
The player task sends only one event “
EVT_PLAYER”
with differents arguments.
Table 5-15. Player event arguments
EVT_USB_HOST_HID_MOUSE_BTN2 USB host has received an event “clic bouton 2” via a HID
device.
EVT_USB_HOST_HID_MOUSE_BTN3 USB host has received an event “clic bouton 3” via a HID
device.
EVT_USB_HOST_HID_MOUSE_MOVE USB host has received an event mouse move” via a HID
device.
EVT_USB_HOST_HID_KB_KEY USB has received an event “key press” via a HID device.
EVT_USB_HOST_CDC_CHANGE A CDC device has been detected or disconnected.
Event Label Description
Command Label Description
CMD_PLAYER_GET_BARGRAPH Ask a bargraph data.
The result is sent by player task via a event.
Arguments of “EVT_PLAYER” Description
PLAYER_BOF Beginning of the played file reached.
Note: player_task_stop() is automaticly executed.
PLAYER_EOF End of the played file reached, the player is stopped.
Note: player_task_stop() is automaticly executed.
PLAYER_ERROR_UNDERRUN Under-run occurred but play continues
PLAYER_ERROR_SYNCH Audio processor synchronization lost but play continues
PLAYER_START_AB Play of the AB track has restarted
PLAYER_EOF_AB End of the played AB track, start the research of A position
PLAYER_BARGRAPH Bargraph resultat of command CMD_PLAYER_GET_BARGRAPH