diff options
author | Dean Camera <dean@fourwalledcubicle.com> | 2011-06-09 04:08:03 +0000 |
---|---|---|
committer | Dean Camera <dean@fourwalledcubicle.com> | 2011-06-09 04:08:03 +0000 |
commit | 1f1d0710f379a8b08ef646cbadb63d92c35e47fb (patch) | |
tree | 886a528a8ba721733735c1cded2462e6992e11f6 /Demos/Device/ClassDriver | |
parent | 0bf5064aec5ac43ba2b25d44528bebb27db2f117 (diff) | |
download | lufa-1f1d0710f379a8b08ef646cbadb63d92c35e47fb.tar.gz lufa-1f1d0710f379a8b08ef646cbadb63d92c35e47fb.tar.bz2 lufa-1f1d0710f379a8b08ef646cbadb63d92c35e47fb.zip |
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.
Diffstat (limited to 'Demos/Device/ClassDriver')
-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 447cb91dd..4bf1ef875 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 f1d606070..a1125d62f 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 */ |