diff options
Diffstat (limited to 'Demos/Device/LowLevel/AudioOutput')
-rw-r--r-- | Demos/Device/LowLevel/AudioOutput/AudioOutput.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/Demos/Device/LowLevel/AudioOutput/AudioOutput.c b/Demos/Device/LowLevel/AudioOutput/AudioOutput.c index 7a9c6eca0..07418d5d9 100644 --- a/Demos/Device/LowLevel/AudioOutput/AudioOutput.c +++ b/Demos/Device/LowLevel/AudioOutput/AudioOutput.c @@ -136,13 +136,16 @@ void EVENT_USB_Disconnect(void) */
void EVENT_USB_ConfigurationChanged(void)
{
- /* Setup audio stream endpoint */
- Endpoint_ConfigureEndpoint(AUDIO_STREAM_EPNUM, EP_TYPE_ISOCHRONOUS,
- ENDPOINT_DIR_OUT, AUDIO_STREAM_EPSIZE,
- ENDPOINT_BANK_DOUBLE);
-
/* Indicate USB connected and ready */
LEDs_SetAllLEDs(LEDMASK_USB_READY);
+
+ /* Setup audio stream endpoint */
+ if (!(Endpoint_ConfigureEndpoint(AUDIO_STREAM_EPNUM, EP_TYPE_ISOCHRONOUS,
+ ENDPOINT_DIR_OUT, AUDIO_STREAM_EPSIZE,
+ ENDPOINT_BANK_DOUBLE)))
+ {
+ LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
+ }
}
/** Event handler for the USB_UnhandledControlPacket event. This is used to catch standard and class specific
|