mirror of
https://github.com/qmk/qmk_firmware.git
synced 2025-06-06 08:22:44 +00:00
Update AudioInput and AudioOutput Class Driver device mode demos to use a switch statement when selecting the audio request type for clarity.
This commit is contained in:
parent
8c3d421a01
commit
75da0d1877
@ -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)
|
||||
{
|
||||
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user