diff options
| author | Dean <Dean@d5102386-fcda-11dd-9fdb-3debd5008f28> | 2011-06-09 04:08:03 +0000 |
|---|---|---|
| committer | Dean <Dean@d5102386-fcda-11dd-9fdb-3debd5008f28> | 2011-06-09 04:08:03 +0000 |
| commit | fcf6fac322890da8720cd50782adbca36779da86 (patch) | |
| tree | 886a528a8ba721733735c1cded2462e6992e11f6 /Demos/Device | |
| parent | 336e2642c00c972bfe4d17b8a65d300509b938a6 (diff) | |
Add new Audio Class Driver Host demos.
Fix errors in the new Audio Host mode Class Driver, which would have prevented data from being sent or received properly by the device.
Add microphone/square wave generation compile time switch to the Low Level AudioOutput Host demo.
git-svn-id: http://lufa-lib.googlecode.com/svn/trunk@1794 d5102386-fcda-11dd-9fdb-3debd5008f28
Diffstat (limited to 'Demos/Device')
| -rw-r--r-- | Demos/Device/ClassDriver/AudioInput/AudioInput.c | 2 | ||||
| -rw-r--r-- | Demos/Device/ClassDriver/AudioOutput/AudioOutput.c | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/Demos/Device/ClassDriver/AudioInput/AudioInput.c b/Demos/Device/ClassDriver/AudioInput/AudioInput.c index 447cb91d..4bf1ef87 100644 --- a/Demos/Device/ClassDriver/AudioInput/AudioInput.c +++ b/Demos/Device/ClassDriver/AudioInput/AudioInput.c @@ -98,7 +98,7 @@ ISR(TIMER0_COMPA_vect, ISR_BLOCK) { uint8_t PrevEndpoint = Endpoint_GetCurrentEndpoint(); - /* Check if the sample reload timer period has elapsed, and that the USB bus is ready for a new sample */ + /* Check that the USB bus is ready for the next sample to write */ if (Audio_Device_IsReadyForNextSample(&Microphone_Audio_Interface)) { int16_t AudioSample; diff --git a/Demos/Device/ClassDriver/AudioOutput/AudioOutput.c b/Demos/Device/ClassDriver/AudioOutput/AudioOutput.c index f1d60607..a1125d62 100644 --- a/Demos/Device/ClassDriver/AudioOutput/AudioOutput.c +++ b/Demos/Device/ClassDriver/AudioOutput/AudioOutput.c @@ -91,7 +91,8 @@ void SetupHardware(void) ISR(TIMER0_COMPA_vect, ISR_BLOCK) { uint8_t PrevEndpoint = Endpoint_GetCurrentEndpoint(); - + + /* Check that the USB bus is ready for the next sample to read */ if (Audio_Device_IsSampleReceived(&Speaker_Audio_Interface)) { /* Retrieve the signed 16-bit left and right audio samples, convert to 8-bit */ |
