Struct qwiic_mp3_trigger::QwiicMP3Trigger [−][src]
This object communicates with a Sparkfun Qwiic MP3 Trigger over i2c.
Methods
impl<T> QwiicMP3Trigger<T> where
T: I2CDevice + Sized,
[src]
impl<T> QwiicMP3Trigger<T> where
T: I2CDevice + Sized,
pub fn new(i2cdev: T) -> Result<QwiicMP3Trigger<T>, T::Error>
[src]
pub fn new(i2cdev: T) -> Result<QwiicMP3Trigger<T>, T::Error>
Constructs a new QwiicMP3Trigger<T>
.
pub fn ping(&mut self) -> Result<(), T::Error>
[src]
pub fn ping(&mut self) -> Result<(), T::Error>
Tests communication.
pub fn get_song_count(&mut self) -> Result<u8, T::Error>
[src]
pub fn get_song_count(&mut self) -> Result<u8, T::Error>
Returns the number of songs on the SD card, including trigger songs.
pub fn get_version(&mut self) -> Result<String, T::Error>
[src]
pub fn get_version(&mut self) -> Result<String, T::Error>
Returns the version of the Qwiic MP3 Trigger firmware.
pub fn play_track(&mut self, track: u8) -> Result<(), T::Error>
[src]
pub fn play_track(&mut self, track: u8) -> Result<(), T::Error>
Plays a track based on the sorting rules of the WT2003S.
pub fn play_filenumber(&mut self, filenumber: u8) -> Result<(), T::Error>
[src]
pub fn play_filenumber(&mut self, filenumber: u8) -> Result<(), T::Error>
Plays a track based on the filename. 3
will play a file matching F003***.mp3
.
pub fn play_next(&mut self) -> Result<(), T::Error>
[src]
pub fn play_next(&mut self) -> Result<(), T::Error>
Plays the next track based on the sorting rules of the WT2003S.
pub fn play_previous(&mut self) -> Result<(), T::Error>
[src]
pub fn play_previous(&mut self) -> Result<(), T::Error>
Plays the previous track based on the sorting rules of the WT2003S.
pub fn stop(&mut self) -> Result<(), T::Error>
[src]
pub fn stop(&mut self) -> Result<(), T::Error>
Stops playing. Note that this may result in buzzing because the audio output it not disabled. You may wish to play a long silence instead.
pub fn pause(&mut self) -> Result<(), T::Error>
[src]
pub fn pause(&mut self) -> Result<(), T::Error>
Pauses playing. Note that this may result in buzzing because the audio output it not disabled. You may wish to play a long silence instead.
pub fn get_play_status(&mut self) -> Result<PlayStatus, T::Error>
[src]
pub fn get_play_status(&mut self) -> Result<PlayStatus, T::Error>
Returns the play status.
pub fn get_card_status(&mut self) -> Result<CardStatus, T::Error>
[src]
pub fn get_card_status(&mut self) -> Result<CardStatus, T::Error>
Checks the status of the SD card.
pub fn get_song_name(&mut self) -> Result<String, T::Error>
[src]
pub fn get_song_name(&mut self) -> Result<String, T::Error>
Returns the name of the currently playing song. May return unable to parse
.
pub fn set_eq(&mut self, mode: EqualizerMode) -> Result<(), T::Error>
[src]
pub fn set_eq(&mut self, mode: EqualizerMode) -> Result<(), T::Error>
Set the equalizer mode.
pub fn set_volume(&mut self, level: u8) -> Result<(), T::Error>
[src]
pub fn set_volume(&mut self, level: u8) -> Result<(), T::Error>
Set the volume between 0 (off) to 31 (max).
pub fn set_address(&mut self, address: u8) -> Result<(), T::Error>
[src]
pub fn set_address(&mut self, address: u8) -> Result<(), T::Error>
Set the i2c address of the device.
Trait Implementations
Auto Trait Implementations
impl<T> Send for QwiicMP3Trigger<T> where
T: Send,
impl<T> Send for QwiicMP3Trigger<T> where
T: Send,
impl<T> Sync for QwiicMP3Trigger<T> where
T: Sync,
impl<T> Sync for QwiicMP3Trigger<T> where
T: Sync,