Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: mbed SDFileSystem
sd_card_player.h
- Committer:
- kchen7
- Date:
- 2019-04-27
- Revision:
- 7:af45a10fdfb6
File content as of revision 7:af45a10fdfb6:
#include <mbed.h>
typedef struct uFMT_STRUCT {
short comp_code;
short num_channels;
unsigned sample_rate;
unsigned avg_Bps;
short block_align;
short sig_bps;
} FMT_STRUCT;
class sd_card_player {
public:
sd_card_player(AnalogOut *_dac);
/** the player function.
*
* @param wavefile A pointer to an opened wave file
*/
void play(FILE *wavefile);
private:
void dac_out(void);
AnalogOut *wave_DAC;
Ticker tick;
unsigned short DAC_fifo[256];
short DAC_wptr;
volatile short DAC_rptr;
short DAC_on;
};
