amended wave player
Fork of wave_player_appbd by
Diff: wave_player.h
- Revision:
- 3:b10ea1b38f08
- Parent:
- 2:b1cea7afcfd2
--- a/wave_player.h Fri Nov 01 15:24:51 2013 +0000 +++ b/wave_player.h Thu Apr 09 20:23:37 2015 +0000 @@ -1,5 +1,5 @@ #include <mbed.h> - +//Serial terminal(USBTX,USBRX); typedef struct uFMT_STRUCT { short comp_code; short num_channels; @@ -37,7 +37,7 @@ * * @param _dac pointer to an AnalogOut object to which the samples are sent. */ -wave_player(AnalogOut *_dac, PwmOut *_pwm); +wave_player(AnalogOut *_dac, PwmOut *_pwm, unsigned short * waveArray); /** the player function. * @@ -57,12 +57,13 @@ * @param v the verbosity level */ void set_verbosity(int v); - +void getFIFO(unsigned short *); private: void dac_out(void); int verbosity; AnalogOut *wave_DAC; PwmOut *wave_PWM; +unsigned short * wavebuf; Ticker tick; unsigned short DAC_fifo[256]; short DAC_wptr;