X-Git-Url: http://git.linex4red.de/pub/USBasp.git/blobdiff_plain/ceed4e680f630e798bdd9f3d20bd9c8246dd092f..c757acf1f7f3f45522024af7adf8df71a42a1dc1:/Demos/Device/ClassDriver/AudioOutput/AudioOutput.c diff --git a/Demos/Device/ClassDriver/AudioOutput/AudioOutput.c b/Demos/Device/ClassDriver/AudioOutput/AudioOutput.c index 6a87211e5..22d19a4d5 100644 --- a/Demos/Device/ClassDriver/AudioOutput/AudioOutput.c +++ b/Demos/Device/ClassDriver/AudioOutput/AudioOutput.c @@ -1,13 +1,13 @@ /* LUFA Library - Copyright (C) Dean Camera, 2012. + Copyright (C) Dean Camera, 2013. dean [at] fourwalledcubicle [dot] com www.lufa-lib.org */ /* - Copyright 2012 Dean Camera (dean [at] fourwalledcubicle [dot] com) + Copyright 2013 Dean Camera (dean [at] fourwalledcubicle [dot] com) Permission to use, copy, modify, distribute, and sell this software and its documentation for any purpose is hereby granted @@ -18,7 +18,7 @@ advertising or publicity pertaining to distribution of the software without specific, written prior permission. - The author disclaim all warranties with regard to this + The author disclaims all warranties with regard to this software, including all implied warranties of merchantability and fitness. In no event shall the author be liable for any special, indirect or consequential damages or any damages @@ -44,10 +44,14 @@ USB_ClassInfo_Audio_Device_t Speaker_Audio_Interface = { .Config = { + .ControlInterfaceNumber = 0, .StreamingInterfaceNumber = 1, - - .DataOUTEndpointNumber = AUDIO_STREAM_EPNUM, - .DataOUTEndpointSize = AUDIO_STREAM_EPSIZE, + .DataOUTEndpoint = + { + .Address = AUDIO_STREAM_EPADDR, + .Size = AUDIO_STREAM_EPSIZE, + .Banks = 2, + }, }, }; @@ -63,7 +67,7 @@ int main(void) SetupHardware(); LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY); - sei(); + GlobalInterruptEnable(); for (;;) { @@ -208,7 +212,7 @@ void EVENT_USB_Device_ControlRequest(void) * * When the DataLength parameter is NULL, this callback should only indicate whether the specified operation is valid for * the given endpoint index, and should return as fast as possible. When non-NULL, this value may be altered for GET operations - * to indicate the size of the retreived data. + * to indicate the size of the retrieved data. * * \note The length of the retrieved data stored into the Data buffer on GET operations should not exceed the initial value * of the \c DataLength parameter. @@ -223,7 +227,7 @@ void EVENT_USB_Device_ControlRequest(void) * \param[in,out] Data Pointer to a location where the parameter data is stored for SET operations, or where * the retrieved data is to be stored for GET operations. * - * \return Boolean true if the property get/set was successful, false otherwise + * \return Boolean \c true if the property get/set was successful, \c false otherwise */ bool CALLBACK_Audio_Device_GetSetEndpointProperty(USB_ClassInfo_Audio_Device_t* const AudioInterfaceInfo, const uint8_t EndpointProperty, @@ -233,7 +237,7 @@ bool CALLBACK_Audio_Device_GetSetEndpointProperty(USB_ClassInfo_Audio_Device_t* uint8_t* Data) { /* Check the requested endpoint to see if a supported endpoint is being manipulated */ - if (EndpointAddress == (ENDPOINT_DIR_OUT | Speaker_Audio_Interface.Config.DataOUTEndpointNumber)) + if (EndpointAddress == Speaker_Audio_Interface.Config.DataOUTEndpoint.Address) { /* Check the requested control to see if a supported control is being manipulated */ if (EndpointControl == AUDIO_EPCONTROL_SamplingFreq) @@ -276,7 +280,7 @@ bool CALLBACK_Audio_Device_GetSetEndpointProperty(USB_ClassInfo_Audio_Device_t* * * When the DataLength parameter is NULL, this callback should only indicate whether the specified operation is valid for * the given entity and should return as fast as possible. When non-NULL, this value may be altered for GET operations - * to indicate the size of the retreived data. + * to indicate the size of the retrieved data. * * \note The length of the retrieved data stored into the Data buffer on GET operations should not exceed the initial value * of the \c DataLength parameter.