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
|
@ -144,8 +144,7 @@ void EVENT_USB_Device_ConfigurationChanged(void)
|
|||
bool ConfigSuccess = true;
|
||||
|
||||
/* Setup Audio Stream Endpoint */
|
||||
ConfigSuccess &= Endpoint_ConfigureEndpoint(AUDIO_STREAM_EPNUM, EP_TYPE_ISOCHRONOUS, ENDPOINT_DIR_OUT,
|
||||
AUDIO_STREAM_EPSIZE, ENDPOINT_BANK_DOUBLE);
|
||||
ConfigSuccess &= Endpoint_ConfigureEndpoint(AUDIO_STREAM_EPADDR, EP_TYPE_ISOCHRONOUS, AUDIO_STREAM_EPSIZE, 2);
|
||||
|
||||
/* Indicate endpoint configuration success or failure */
|
||||
LEDs_SetAllLEDs(ConfigSuccess ? LEDMASK_USB_READY : LEDMASK_USB_ERROR);
|
||||
|
@ -191,7 +190,7 @@ void EVENT_USB_Device_ControlRequest(void)
|
|||
uint8_t EndpointControl = (USB_ControlRequest.wValue >> 8);
|
||||
|
||||
/* Only handle SET CURRENT requests to the audio endpoint's sample frequency property */
|
||||
if ((EndpointAddress == (ENDPOINT_DIR_OUT | AUDIO_STREAM_EPNUM)) && (EndpointControl == AUDIO_EPCONTROL_SamplingFreq))
|
||||
if ((EndpointAddress == AUDIO_STREAM_EPADDR) && (EndpointControl == AUDIO_EPCONTROL_SamplingFreq))
|
||||
{
|
||||
uint8_t SampleRate[3];
|
||||
|
||||
|
@ -216,7 +215,7 @@ void EVENT_USB_Device_ControlRequest(void)
|
|||
uint8_t EndpointControl = (USB_ControlRequest.wValue >> 8);
|
||||
|
||||
/* Only handle GET CURRENT requests to the audio endpoint's sample frequency property */
|
||||
if ((EndpointAddress == (ENDPOINT_DIR_OUT | AUDIO_STREAM_EPNUM)) && (EndpointControl == AUDIO_EPCONTROL_SamplingFreq))
|
||||
if ((EndpointAddress == AUDIO_STREAM_EPADDR) && (EndpointControl == AUDIO_EPCONTROL_SamplingFreq))
|
||||
{
|
||||
uint8_t SampleRate[3];
|
||||
|
||||
|
@ -241,7 +240,7 @@ ISR(TIMER0_COMPA_vect, ISR_BLOCK)
|
|||
uint8_t PrevEndpoint = Endpoint_GetCurrentEndpoint();
|
||||
|
||||
/* Select the audio stream endpoint */
|
||||
Endpoint_SelectEndpoint(AUDIO_STREAM_EPNUM);
|
||||
Endpoint_SelectEndpoint(AUDIO_STREAM_EPADDR);
|
||||
|
||||
/* Check if the current endpoint can be read from (contains a packet) and the host is sending data */
|
||||
if (Endpoint_IsOUTReceived() && StreamingAudioInterfaceSelected)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue