Skip to content
Snippets Groups Projects
Commit 75da0d18 authored by Dean Camera's avatar Dean Camera
Browse files

Update AudioInput and AudioOutput Class Driver device mode demos to use a...

Update AudioInput and AudioOutput Class Driver device mode demos to use a switch statement when selecting the audio request type for clarity.
parent 8c3d421a
Branches
Tags
No related merge requests found
......@@ -201,9 +201,9 @@ bool CALLBACK_Audio_Device_GetSetEndpointProperty(USB_ClassInfo_Audio_Device_t*
/* Check the requested control to see if a supported control is being manipulated */
if (EndpointControl == AUDIO_EPCONTROL_SamplingFreq)
{
/* Check the requested property to see if a supported property is being manipulated */
if (EndpointProperty == AUDIO_REQ_SetCurrent)
switch (EndpointProperty)
{
case AUDIO_REQ_SetCurrent:
/* Check if we are just testing for a valid property, or actually adjusting it */
if (DataLength != NULL)
{
......@@ -215,9 +215,7 @@ bool CALLBACK_Audio_Device_GetSetEndpointProperty(USB_ClassInfo_Audio_Device_t*
}
return true;
}
else if (EndpointProperty == AUDIO_REQ_GetCurrent)
{
case AUDIO_REQ_GetCurrent:
/* Check if we are just testing for a valid property, or actually reading it */
if (DataLength != NULL)
{
......
......@@ -238,9 +238,9 @@ bool CALLBACK_Audio_Device_GetSetEndpointProperty(USB_ClassInfo_Audio_Device_t*
/* Check the requested control to see if a supported control is being manipulated */
if (EndpointControl == AUDIO_EPCONTROL_SamplingFreq)
{
/* Check the requested property to see if a supported property is being manipulated */
if (EndpointProperty == AUDIO_REQ_SetCurrent)
switch (EndpointProperty)
{
case AUDIO_REQ_SetCurrent:
/* Check if we are just testing for a valid property, or actually adjusting it */
if (DataLength != NULL)
{
......@@ -252,9 +252,7 @@ bool CALLBACK_Audio_Device_GetSetEndpointProperty(USB_ClassInfo_Audio_Device_t*
}
return true;
}
else if (EndpointProperty == AUDIO_REQ_GetCurrent)
{
case AUDIO_REQ_GetCurrent:
/* Check if we are just testing for a valid property, or actually reading it */
if (DataLength != NULL)
{
......
This diff is collapsed.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment