9#ifndef vs1053_avr_renesas_uno_h
10#define vs1053_avr_renesas_uno_h
134#define SCI_STATUS 0x01
150#define SCI_CLOCKF 0x03
164#define SCI_DECODE_TIME 0x04
175#define SCI_AUDATA 0x05
195#define SCI_WRAMADDR 0x07
208#define SCI_HDAT0 0x08
221#define SCI_HDAT1 0x09
233#define SCI_AIADDR 0x0A
255#define SCI_AICTRL0 0x0C
263#define SCI_AICTRL1 0x0D
271#define SCI_AICTRL2 0x0E
279#define SCI_AICTRL3 0x0F
297#define SM_DIFF 0x0001
306#define SM_LAYER12 0x0002
313#define SM_RESET 0x0004
323#define SM_CANCEL 0x0008
334#define SM_EARSPEAKER_LO 0x0010
345#define SM_TESTS 0x0020
352#define SM_STREAM 0x0040
364#define SM_EARSPEAKER_HI 0x0080
372#define SM_DACT 0x0100
383#define SM_SDIORD 0x0200
393#define SM_SDISHARE 0x0400
403#define SM_SDINEW 0x0800
411#define SM_ADPCM 0x1000
423#define SM_PAUSE 0x2000
433#define SM_LINE1 0x4000
442#define SM_CLK_RANGE 0x8000
476#define SS_VU_ENABLE 0x0200
497#define para_chipID_0 0x1E00
508#define para_chipID_1 0x1E01
518#define para_version 0x1E02
530#define para_config1 0x1E03
540#define para_playSpeed 0x1E04
554#define para_byteRate 0x1E05
569#define para_endFillByte 0x1E06
583#define para_MonoOutput 0x1E09
597#define para_positionMsec_0 0x1E27
610#define para_positionMsec_1 0x1E28
622#define para_resync 0x1E29
654#define TRACK_ARTIST 33
664#define TRACK_ALBUM 63
702 uint8_t
playMP3(
char*, uint32_t timecode = 0);
708 uint8_t
skip(int32_t);
Interface Driver to the VS10xx chip on the SPI.
static void Mp3WriteWRAM(uint16_t, uint16_t)
Write a VS10xx WRAM Location.
static void spiInit()
Initialize the SPI for VS10xx use.
uint8_t getDifferentialOutput()
Get the current SM_DIFF setting from the VS10xx chip.
void resumeDataStream()
Unpause streaming data to the VSdsp.
static void dcs_low()
Select Data Channel.
uint8_t VolL
contains a local value of the VSdsp's master volume left channels
void setDifferentialOutput(uint16_t)
Set the current SM_DIFF setting of the VS10xx chip.
uint16_t getVolume()
Get the current volume from the VS10xx chip.
uint16_t memoryTest()
Perform Memory Test.
static void cs_low()
Select Control Channel.
static void dcs_high()
Deselect Data Channel.
static void Mp3WriteRegister(uint8_t, uint8_t, uint8_t)
Write a value a VSDsp's register.
uint8_t VolR
contains a local value of the VSdsp's master volume Right channels
void trackAlbum(char *)
Get Track's Album.
uint16_t getBassFrequency()
Get the current Bass Frequency limit from the VS10xx chip.
void setBassFrequency(uint16_t)
Set the current Bass Boost Frequency limit cutoff in VS10xx chip.
uint8_t disableTestSineWave()
Disable Test Sine wave.
state_m getState()
Get the current state of the device.
static state_m playing_state
Boolean flag indicating if filehandle is streaming.
void stopTrack()
Gracefully close track and cancel refill.
void setBitRate(uint16_t)
Force bit rate.
uint8_t begin()
Initialize the MP3 Player shield.
static SdFile track
Initializer for the instance of the SdCard's static member.
uint8_t skipTo(uint32_t)
Skips to a certain point in the track.
uint8_t ADMixerLoad(char *)
Initially load ADMixer patch and configure line/mic mode.
uint8_t isPlaying()
Inidicate if a song is playing?
uint8_t playMP3(char *, uint32_t timecode=0)
Begin playing a mp3 file by its filename.
uint8_t playTrack(uint8_t)
Begin playing a mp3 file, just with a number.
void setEarSpeaker(uint16_t)
Set the current Spatial EarSpeaker setting of the VS10xx chip.
void SendSingleMIDInote()
Play hardcoded MIDI file.
int8_t getBassAmplitude()
Get the current Bass boost amplitude from the VS10xx chip.
int8_t setVUmeter(int8_t)
enable VSdsp VU Meter
uint8_t bitrate
contains a local value of the beleived current bit-rate.
void getAudioInfo()
Display various Audio information from the VSdsp.
static void cs_high()
Deselect Control Channel.
int8_t getVUmeter()
get the status of the VSdsp VU Meter
void setTrebleFrequency(uint16_t)
Set the current treble frequency limit in VS10xx chip.
uint32_t currentPosition()
Current timecode in ms.
uint16_t getMonoMode()
Get the current Stereo/Mono setting of the VS10xx output.
void end()
Disables the MP3 Player shield.
static uint16_t Mp3ReadWRAM(uint16_t)
Read a VS10xx WRAM Location.
int8_t getTrebleAmplitude()
Get the current Treble Amplitude from the VS10xx chip.
static uint32_t spi_Max_Rate
Rate of the SPI to be used with communicating to the VSdsp.
void setBassAmplitude(uint8_t)
Set the current Bass Boost amplitude in VS10xx chip.
void setVolume(uint8_t, uint8_t)
Store and Push member volume to VS10xx chip.
uint16_t getTrebleFrequency()
Get the current Treble Frequency limit from the VS10xx chip.
void setTrebleAmplitude(int8_t)
Set the current Treble Amplitude in VS10xx chip.
void getBitRateFromMP3File(char *)
Read the Bit-Rate from the current track's filehandle.
static void refill()
Refill the VS10xx buffer with new data.
uint8_t VSLoadUserCode(char *)
load VS1xxx with patch or plugin from file on SDcard.
static void available()
Public interface of refill.
void pauseDataStream()
Pause streaming data to the VSdsp.
void ADMixerVol(int8_t)
Set ADMixer's attenuation of input to between -3 and -31 dB otherwise disable.
void setMonoMode(uint16_t)
Set the current Stereo/Mono setting of the VS10xx output.
uint8_t vs_init()
Initialize the VS10xx Audio Decoder Chip.
void setPlaySpeed(uint16_t)
Set the current playSpeed of the VS10xx chip.
int16_t getVUlevel()
get current measured VU Meter
uint32_t start_of_music
contains a filehandles offset to the begining of the current file.
static void disableRefill()
Disable the Interrupts for refill.
uint8_t getEarSpeaker()
Get the current Spatial EarSpeaker setting from the VS10xx chip.
void trackTitle(char *)
Get Track's Title.
bool resumeMusic()
Resume music from where it was paused.
static void enableRefill()
Enable the Interrupts for refill.
void pauseMusic()
Pause music.
static uint16_t Mp3ReadRegister(uint8_t)
Read a VS10xx register.
uint8_t enableTestSineWave(uint8_t)
Generate Test Sine wave.
uint8_t skip(int32_t)
Skips to a duration in the track.
void getTrackInfo(uint8_t, char *)
Fetch ID3 Tag information.
uint16_t getPlaySpeed()
Get the current playSpeed from the VS10xx chip.
void trackArtist(char *)
Get Track's Artist.
static void flush_cancel(flush_m)
flush the VSdsp buffer and cancel
static uint8_t mp3DataBuffer[32]
Buffer for moving data between Filehandle and VSdsp.
A handler for accessing bytes of a word.
uint16_t word
whole word value
A handler for accessing nibbles of the SCI_BASS word.
struct vs1053::sci_bass_m::@122063340134256071104100347103242272313255100340 nibble
individual Nibbles
uint16_t word
whole word value
int8_t irq
External reference to the interrupt identifier for MP3_DREQ.
state_m
State of the vs1053 device.
bool isFnMusic(char *)
is the filename music
char * strip_nonalpha_inplace(char *s)
chomp non printable characters out of string.
flush_m
How to flush the VSdsp's buffer.
@ both
Flush both First and After.