Just a simple library for VLSI's mp3/midi codec chip

Dependents:   IsuProject_LPC1768

Embed: (wiki syntax)

« Back to documentation index

VS1053 Class Reference

VS1053 Class Reference

Class VS1053. More...

#include <VS1053.h>

Public Member Functions

 VS1053 (PinName mosiPin, PinName misoPin, PinName sckPin, PinName csPin, PinName bsyncPin, PinName dreqPin, PinName rstPin, uint32_t spiFrequency=1000000)
 Constructor of class VS1053.
 ~VS1053 ()
 Destructor of class VS1053.
void hardwareReset ()
 Make a hardware reset by hitting VS1053's RESET pin.
void sendDataByte (uint8_t data)
 Send a data byte to VS1053.
size_t sendDataBlock (uint8_t *data, size_t length)
 Send a data block specified as a pointer to VS1053.
void clockUp ()
 Change VS1053's PLL setting for speedup.
bool sendCancel ()
 Send cancel request to VS1053.
bool stop ()
 Attempt a termination of playing.

Detailed Description

Class VS1053.

Drives VLSI's mp3/midi codec chip.

Definition at line 11 of file VS1053.h.


Constructor & Destructor Documentation

VS1053 ( PinName  mosiPin,
PinName  misoPin,
PinName  sckPin,
PinName  csPin,
PinName  bsyncPin,
PinName  dreqPin,
PinName  rstPin,
uint32_t  spiFrequency = 1000000 
)

Constructor of class VS1053.

Definition at line 11 of file VS1053.cpp.

~VS1053 (  )

Destructor of class VS1053.

Definition at line 31 of file VS1053.cpp.


Member Function Documentation

void clockUp (  )

Change VS1053's PLL setting for speedup.

Definition at line 71 of file VS1053.cpp.

void hardwareReset (  )

Make a hardware reset by hitting VS1053's RESET pin.

Definition at line 35 of file VS1053.cpp.

bool sendCancel (  )

Send cancel request to VS1053.

Returns:
Zero at failure, non-zero at success.

Definition at line 80 of file VS1053.cpp.

size_t sendDataBlock ( uint8_t *  data,
size_t  length 
)

Send a data block specified as a pointer to VS1053.

Returns:
Data length successfully sent.

Definition at line 53 of file VS1053.cpp.

void sendDataByte ( uint8_t  data )

Send a data byte to VS1053.

Definition at line 43 of file VS1053.cpp.

bool stop (  )

Attempt a termination of playing.

Please call this repeatedly during data stream tramsission until it successes.

Returns:
Zero at failure, non-zero at success.

Definition at line 97 of file VS1053.cpp.