Production Test Program (PTP) for the LPC4088 Experiment Base Board
Dependencies: EALib I2S LM75B SDFileSystem mbed
Diff: TestAudio.h
- Revision:
- 3:7ef908e84ae1
- Parent:
- 2:2f4b7535ceb3
--- a/TestAudio.h Thu Aug 28 09:36:13 2014 +0000 +++ b/TestAudio.h Mon Sep 08 11:34:53 2014 +0000 @@ -17,6 +17,11 @@ #ifndef TESTAUDIO_H #define TESTAUDIO_H +#include "WM8731.h" +#include "I2S.h" + +#define ECHOLENGTH 12000 + /** * Test the WM8731 audio codec and the audio connectors on @@ -26,6 +31,11 @@ public: /** + * Create an interface to the audio codec + */ + TestAudio(); + + /** * Test the audio * * @return true if the test was successful; otherwise false @@ -34,6 +44,21 @@ private: + /** + * Callback function for I2S + */ + void echo(void); + + WM8731 _codec; + I2S _i2sTx; + I2S _i2sRx; + AnalogIn _aIn; + + int _waveIdx; + int _echoBufPtr; + int _echoBuf[ECHOLENGTH]; + int _txBuf[16]; + int _rxBuf[16]; }; #endif