dfplayer_mode_t
Enumeration of the playback modes supported by the DFPlayer.
 
@ DFPLAYER_MODE_REPEAT
Repeating a single file.
 
@ DFPLAYER_MODE_REPEAT_DIR
Repeating a directory.
 
@ DFPLAYER_MODE_NUMOF
Number of supported playback modes.
 
@ DFPLAYER_MODE_NORMAL
Normal playback.
 
@ DFPLAYER_MODE_UNKOWN
No idea, the data sheet is vague.
 
@ DFPLAYER_MODE_RANDOM
Playing all files in random order.
 
dfplayer_scheme_t
Enumeration of the different naming schemes.
 
@ DFPLAYER_SCHEME_FOLDER_FILE
Naming scheme <folder>/<file>
 
@ DFPLAYER_SCHEME_NUMOF
Number of naming schemes supported.
 
@ DFPLAYER_SCHEME_MP3_FILE
Naming scheme MP3/<number>
 
dfplayer_source_t
Enumeration of the different sources for playback supported.
 
@ DFPLAYER_SOURCE_NUMOF
Number of supported playback modes.
 
@ DFPLAYER_SOURCE_SDCARD
Read files from SD card.
 
@ DFPLAYER_SOURCE_FLASH
Read files from NOR flash.
 
@ DFPLAYER_SOURCE_AUX
No idea, the data sheet never mentions AUX again.
 
@ DFPLAYER_SOURCE_SLEEP
No idea, the data sheet is extremely vague on this.
 
@ DFPLAYER_SOURCE_USB
Read files from USB storage.
 
dfplayer_rx_state_t
Enumeration of the RX states of the DFPlayer driver.
 
@ DFPLAYER_RX_STATE_DATA
Receiving data.
 
@ DFPLAYER_RX_STATE_VERSION
Waiting for version (0xff)
 
@ DFPLAYER_RX_STATE_LENGTH
Waiting for length (0x06)
 
@ DFPLAYER_RX_STATE_START
Waiting for start symbol (0x7e)
 
@ DFPLAYER_RX_STATE_NUMOF
Number of RX states.
 
uint8_t dfplayer_source_set_t
Set of DFPlayer playback sources.
 
dfplayer_eq_t
Enumeration of the equalizer settings supported by the DFPlayer.
 
@ DFPLAYER_EQ_NUMOF
Number of supported equalizer settings.
 
@ DFPLAYER_EQ_CLASSIC
The "Classic" equalizer setting.
 
@ DFPLAYER_EQ_NORMAL
The "Normal" equalizer setting.
 
@ DFPLAYER_EQ_BASE
The "Base" equalizer setting.
 
@ DFPLAYER_EQ_ROCK
The "Rock" equalizer setting.
 
@ DFPLAYER_EQ_JAZZ
The "Jazz" equalizer setting.
 
@ DFPLAYER_EQ_POP
The "Pop" equalizer setting.
 
void(* dfplayer_cb_src_t)(dfplayer_t *dev, dfplayer_source_set_t srcs)
Signature of the function called when a medium was inserted/ejected.
 
void(* dfplayer_cb_done_t)(dfplayer_t *dev, dfplayer_source_t src, uint16_t track)
Signature of the function called when a playback of track completed.
 
dfplayer_state_t
Enumeration of the detectable states of the DFPlayer.
 
@ DFPLAYER_STATE_PAUSED
Playback is paused, can be resumed.
 
@ DFPLAYER_STATE_PLAYING
Currently playing a file.
 
@ DFPLAYER_STATE_STOPPED
No file playing.
 
@ DFPLAYER_STATE_NUMOF
Number of DFPlayer states supported by the driver.
 
struct dfplayer dfplayer_t
A DFPlayer Mini device descriptor.
 
Low-level GPIO peripheral driver interface definitions.
 
uint_fast8_t uart_t
Define default UART type identifier.
 
Mutex for thread synchronization.
 
Data structure representing a file on the DFPlayer.
 
uint8_t file
Name of the file (naming scheme "42/123.mp3")
 
uint8_t folder
Folder of the file (naming scheme "42/123.mp3")
 
dfplayer_scheme_t scheme
Used naming scheme.
 
uint16_t number
Number of the file (naming scheme "MP3/1337.mp3")
 
Initialization parameters of a DFPlayer Mini device descriptor.
 
gpio_t busy_pin
GPIO connected to the DFPlayer's busy pin.
 
uint8_t volume
Initial volume.
 
uart_t uart
UART interface connected to the DFPlayer.
 
A DFPlayer Mini device descriptor.
 
dfplayer_source_set_t srcs
Set of available playback sources.
 
mutex_t mutex
Used to mutual exclusive access.
 
dfplayer_file_t file
Currently played song.
 
dfplayer_cb_done_t cb_done
Function to call when playing a track completed.
 
uint8_t flags
Flags storing info about the driver state.
 
uart_t uart
UART interface connected to the DFPlayer.
 
gpio_t busy_pin
GPIO connected to the DFPlayer's busy pin.
 
dfplayer_cb_src_t cb_src
Function to call when set of available playback sources changes.
 
uint8_t buf[6]
Data buffer for response from DFPlayer.
 
mutex_t sync
Used to wait on ISR.
 
dfplayer_rx_state_t state
Current state of the DFPlayer.
 
uint32_t last_event_us
Time stamp of the last event in µs.
 
uint8_t len
Length of the frame in the buffer.
 
Low-level UART peripheral driver interface definition.