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.
Fork of MagneWave by
MagneWave.h
- Committer:
- pictus
- Date:
- 2013-12-04
- Revision:
- 10:8b31cb1e385b
- Parent:
- 9:486d9fde3e64
File content as of revision 10:8b31cb1e385b:
#ifndef MAGNE_WAVE_H
#define MAGNE_WAVE_H
#include "mbed.h"
#include "SoftMCP4922.h"
class MagneWave
{
public:
/*
* MagneWave - Magnetone wave player
* param
* [in] dac: dac address
*/
MagneWave( SoftMCP4922 *dac );
/*
* play - player function
* param
* [in] wavefile: file pointer
*/
void play( FILE *wavefile );
private:
void dacOut();
SoftMCP4922 *m_wave_DAC;
//FILE *m_wavefile;
Ticker tick;
unsigned short m_fifo[128];
volatile short m_wptr;
volatile short m_rptr;
bool m_dacOn;
bool m_fileEnd;
};
#endif // MAGNE_WAVE_H
