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
00001 #ifndef MAGNE_WAVE_H 00002 #define MAGNE_WAVE_H 00003 00004 #include "mbed.h" 00005 #include "SoftMCP4922.h" 00006 00007 class MagneWave 00008 { 00009 public: 00010 /* 00011 * MagneWave - Magnetone wave player 00012 * param 00013 * [in] dac: dac address 00014 */ 00015 MagneWave( SoftMCP4922 *dac ); 00016 00017 /* 00018 * play - player function 00019 * param 00020 * [in] wavefile: file pointer 00021 */ 00022 void play( FILE *wavefile ); 00023 00024 private: 00025 void dacOut(); 00026 00027 SoftMCP4922 *m_wave_DAC; 00028 //FILE *m_wavefile; 00029 Ticker tick; 00030 unsigned short m_fifo[128]; 00031 volatile short m_wptr; 00032 volatile short m_rptr; 00033 bool m_dacOn; 00034 bool m_fileEnd; 00035 }; 00036 00037 00038 00039 #endif // MAGNE_WAVE_H
Generated on Mon Jul 25 2022 10:21:46 by
1.7.2
