Add branch for the conversion of demos to use standard C header files for configuration, rather than makefile defined macros.
This commit is contained in:
parent
e8570c4a37
commit
359fbfe14d
395 changed files with 9912 additions and 2756 deletions
|
@ -46,9 +46,12 @@ USB_ClassInfo_Audio_Device_t Speaker_Audio_Interface =
|
|||
{
|
||||
.ControlInterfaceNumber = 0,
|
||||
.StreamingInterfaceNumber = 1,
|
||||
|
||||
.DataOUTEndpointNumber = AUDIO_STREAM_EPNUM,
|
||||
.DataOUTEndpointSize = AUDIO_STREAM_EPSIZE,
|
||||
.DataOUTEndpoint =
|
||||
{
|
||||
.Address = AUDIO_STREAM_EPADDR,
|
||||
.Size = AUDIO_STREAM_EPSIZE,
|
||||
.Banks = 2,
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
|
@ -234,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)
|
||||
|
|
|
@ -220,7 +220,7 @@ const USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
|
|||
{
|
||||
.Header = {.Size = sizeof(USB_Audio_Descriptor_StreamEndpoint_Std_t), .Type = DTYPE_Endpoint},
|
||||
|
||||
.EndpointAddress = (ENDPOINT_DIR_OUT | AUDIO_STREAM_EPNUM),
|
||||
.EndpointAddress = AUDIO_STREAM_EPADDR,
|
||||
.Attributes = (EP_TYPE_ISOCHRONOUS | ENDPOINT_ATTR_SYNC | ENDPOINT_USAGE_DATA),
|
||||
.EndpointSize = AUDIO_STREAM_EPSIZE,
|
||||
.PollingIntervalMS = 0x01
|
||||
|
|
|
@ -42,14 +42,11 @@
|
|||
#include <avr/pgmspace.h>
|
||||
|
||||
/* Macros: */
|
||||
/** Endpoint number of the Audio isochronous streaming data endpoint. */
|
||||
#define AUDIO_STREAM_EPNUM 1
|
||||
/** Endpoint address of the Audio isochronous streaming data OUT endpoint. */
|
||||
#define AUDIO_STREAM_EPADDR (ENDPOINT_DIR_OUT | 1)
|
||||
|
||||
/** Endpoint size in bytes of the Audio isochronous streaming data endpoint. The Windows audio stack requires
|
||||
* at least 192 bytes for correct output, thus the smaller 128 byte maximum endpoint size on some of the smaller
|
||||
* USB AVR models will result in unavoidable distorted output.
|
||||
*/
|
||||
#define AUDIO_STREAM_EPSIZE ENDPOINT_MAX_SIZE(AUDIO_STREAM_EPNUM)
|
||||
/** Endpoint size in bytes of the Audio isochronous streaming data endpoint. */
|
||||
#define AUDIO_STREAM_EPSIZE 256
|
||||
|
||||
/* Type Defines: */
|
||||
/** Type define for the device configuration descriptor structure. This must be defined in the
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue