Main Page | Modules | Class Hierarchy | Alphabetical List | Data Structures | File List | Data Fields | Globals | Related Pages

otMiniPlayer Class Reference
[MiniPlayer - A Mini MP3 PlayerMiniPlayer - A Mini MP3 Player]

A Mini MP3 Player. More...

#include <otMiniPlayer.h>


Public Types

enum  Equalizer {
  EQ_NORMAL, EQ_POP, EQ_ROCK, EQ_JAZZ,
  EQ_CLASSIC, EQ_BASS
}
enum  PlaySource {
  PS_U = 1, PS_TF, PS_AUX, PS_SLEEP,
  PS_FLASH
}

Public Member Functions

 otMiniPlayer ()
bool init (U8 uart, U8 timer)
void playbackSource (U8 source)
void reset ()
void startDAC ()
void stopDAC ()
void standbyMode ()
void normalMode ()
void sleep ()
void wakeUp ()
void setVolume (U8 gain)
void volumeAdjustSet (U8 gain)
void incVolume ()
void decVolume ()
void EQSelect (U8 setting)
void randomAll ()
void playNext ()
void playPrevious ()
void play (U16 trackNum)
void playFolder (U8 folderNum, U8 trackNum)
void playFromMP3Folder (U16 trackNum)
void playAdvertisement (U16 trackNum)
void stopAdvertisement ()
void stop ()
void loop (U16 trackNum)
void resume ()
void pause ()
void startRepeatPlay ()
void stopRepeatPlay ()
void repeatFolder (U16 folder)
void startRepeat ()
void stopRepeat ()
bool isPlaying ()
S16 currentSdTrack ()
S16 currentVolume ()
S16 currentEQ ()
S16 currentMode ()
S16 currentVersion ()
S16 numUsbTracks ()
S16 numSdTracks ()
S16 numFlashTracks ()
S16 currentUsbTrack ()
S16 currentFlashTrack ()
S16 numTracksInFolder (U8 folder)
S16 numFolders ()


Detailed Description


Member Enumeration Documentation

enum otMiniPlayer::Equalizer
 

Enumeration values:
EQ_NORMAL 
EQ_POP 
EQ_ROCK 
EQ_JAZZ 
EQ_CLASSIC 
EQ_BASS 

enum otMiniPlayer::PlaySource
 

Enumeration values:
PS_U 
PS_TF 
PS_AUX 
PS_SLEEP 
PS_FLASH 


Constructor & Destructor Documentation

otMiniPlayer.otMiniPlayer  ) 
 

Class constructor


Member Function Documentation

S16 otMiniPlayer.currentEQ  ) 
 

Determine the current EQ setting.

Returns:
EQ setting, -1 if error.

S16 otMiniPlayer.currentFlashTrack  ) 
 

Determine the current track played via flash.

Returns:
Current track played via flash, -1 if error.

S16 otMiniPlayer.currentMode  ) 
 

Determine the current mode.

Returns:
Mode, -1 if error.

S16 otMiniPlayer.currentSdTrack  ) 
 

Determine the current track played via SD card.

Returns:
Current track played via SD card, -1 if error.

S16 otMiniPlayer.currentUsbTrack  ) 
 

Determine the current track played via USB.

Returns:
Current track played via USB, -1 if error.

S16 otMiniPlayer.currentVersion  ) 
 

Determine the current firmware version.

Returns:
Firmware version, -1 if error.

S16 otMiniPlayer.currentVolume  ) 
 

Determine the current volume setting.

Returns:
Volume level (0-30), -1 if error.

void otMiniPlayer.decVolume  ) 
 

Decrement the volume by 1 out of 30.

void otMiniPlayer.EQSelect U8  setting  ) 
 

Set the equalize mode.

Parameters:
setting The desired Equalizer ID.

void otMiniPlayer.incVolume  ) 
 

Increment the volume by 1 out of 30.

bool otMiniPlayer.init U8  uart,
U8  timer
 

Init the library

Parameters:
uart Used UART channel: UART0, UART1, ...
timer Used timer: TIMER0, ...
Returns:
True on success

bool otMiniPlayer.isPlaying  ) 
 

Determine if a track is currently playing.

Returns:
True if a track is currently playing, false if not, -1 if error.

void otMiniPlayer.loop U16  trackNum  ) 
 

Loop a specific track.

Parameters:
trackNum The track number to play.

void otMiniPlayer.normalMode  ) 
 

Pull the MP3 player out of standby mode.

S16 otMiniPlayer.numFlashTracks  ) 
 

Determine the number of tracks accessible via flash.

Returns:
Number of tracks accessible via flash, -1 if error.

S16 otMiniPlayer.numFolders  ) 
 

Determine the number of folders available.

Returns:
Number of folders available, -1 if error.

S16 otMiniPlayer.numSdTracks  ) 
 

Determine the number of tracks accessible via SD card.

Returns:
Number of tracks accessible via SD card, -1 if error.

S16 otMiniPlayer.numTracksInFolder U8  folder  ) 
 

Determine the number of tracks in the specified folder.

Parameters:
folder The folder number.
Returns:
Number of tracks in the specified folder, -1 if error.

S16 otMiniPlayer.numUsbTracks  ) 
 

Determine the number of tracks accessible via USB.

Returns:
Number of tracks accessible via USB, -1 if error.

void otMiniPlayer.pause  ) 
 

Pause playing current track.

void otMiniPlayer.play U16  trackNum  ) 
 

Play a specific track.

Parameters:
trackNum The track number to play.

void otMiniPlayer.playAdvertisement U16  trackNum  ) 
 

Interrupt the current track with a new track.

Parameters:
trackNum The track number to play.

void otMiniPlayer.playbackSource U8  source  ) 
 

Specify the playback source.

Parameters:
source The playback source ID.

void otMiniPlayer.playFolder U8  folderNum,
U8  trackNum
 

Play a specific track from a specific folder.

Parameters:
folderNum The folder number.
trackNum The track number to play.

void otMiniPlayer.playFromMP3Folder U16  trackNum  ) 
 

Play a specific track in the folder named "MP3".

Parameters:
trackNum The track number to play.

void otMiniPlayer.playNext  ) 
 

Play the next song in chronological order.

void otMiniPlayer.playPrevious  ) 
 

Play the previous song in chronological order.

void otMiniPlayer.randomAll  ) 
 

Play all tracks in a random order.

void otMiniPlayer.repeatFolder U16  folder  ) 
 

Play all tracks in a given folder.

Parameters:
folder The folder number.

void otMiniPlayer.reset  ) 
 

Reset all settings to factory default.

void otMiniPlayer.resume  ) 
 

Resume playing current track.

void otMiniPlayer.setVolume U8  gain  ) 
 

Specify volume gain.

Parameters:
gain The volume level (0 - 30).

void otMiniPlayer.sleep  ) 
 

Put the MP3 player into sleep mode.

void otMiniPlayer.standbyMode  ) 
 

Put the MP3 player in standby mode (this is NOT sleep mode).

void otMiniPlayer.startDAC  ) 
 

Turn on DAC.

void otMiniPlayer.startRepeat  ) 
 

Repeat the current track.

void otMiniPlayer.startRepeatPlay  ) 
 

Play all tracks.

void otMiniPlayer.stop  ) 
 

Stop the current playback

void otMiniPlayer.stopAdvertisement  ) 
 

Stop the interrupting track.

void otMiniPlayer.stopDAC  ) 
 

Turn off DAC.

void otMiniPlayer.stopRepeat  ) 
 

Stop repeat play of the current track.

void otMiniPlayer.stopRepeatPlay  ) 
 

Stop repeat play.

void otMiniPlayer.volumeAdjustSet U8  gain  ) 
 

Specify volume gain.

Parameters:
gain The specified volume gain.

void otMiniPlayer.wakeUp  ) 
 

Pull the MP3 player out of sleep mode.


The documentation for this class was generated from the following file: footer
otStudio - Library Reference - (C) 2020-23 Officina Turini, All Rights Reserved
Document built with Doxygen 1.4.0