mirror of
https://github.com/qmk/qmk_firmware.git
synced 2025-06-07 00:42:50 +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 */
|
/* Check the requested control to see if a supported control is being manipulated */
|
||||||
if (EndpointControl == AUDIO_EPCONTROL_SamplingFreq)
|
if (EndpointControl == AUDIO_EPCONTROL_SamplingFreq)
|
||||||
{
|
{
|
||||||
/* Check the requested property to see if a supported property is being manipulated */
|
switch (EndpointProperty)
|
||||||
if (EndpointProperty == AUDIO_REQ_SetCurrent)
|
|
||||||
{
|
{
|
||||||
|
case AUDIO_REQ_SetCurrent:
|
||||||
/* Check if we are just testing for a valid property, or actually adjusting it */
|
/* Check if we are just testing for a valid property, or actually adjusting it */
|
||||||
if (DataLength != NULL)
|
if (DataLength != NULL)
|
||||||
{
|
{
|
||||||
@ -215,9 +215,7 @@ bool CALLBACK_Audio_Device_GetSetEndpointProperty(USB_ClassInfo_Audio_Device_t*
|
|||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
case AUDIO_REQ_GetCurrent:
|
||||||
else if (EndpointProperty == AUDIO_REQ_GetCurrent)
|
|
||||||
{
|
|
||||||
/* Check if we are just testing for a valid property, or actually reading it */
|
/* Check if we are just testing for a valid property, or actually reading it */
|
||||||
if (DataLength != NULL)
|
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 */
|
/* Check the requested control to see if a supported control is being manipulated */
|
||||||
if (EndpointControl == AUDIO_EPCONTROL_SamplingFreq)
|
if (EndpointControl == AUDIO_EPCONTROL_SamplingFreq)
|
||||||
{
|
{
|
||||||
/* Check the requested property to see if a supported property is being manipulated */
|
switch (EndpointProperty)
|
||||||
if (EndpointProperty == AUDIO_REQ_SetCurrent)
|
|
||||||
{
|
{
|
||||||
|
case AUDIO_REQ_SetCurrent:
|
||||||
/* Check if we are just testing for a valid property, or actually adjusting it */
|
/* Check if we are just testing for a valid property, or actually adjusting it */
|
||||||
if (DataLength != NULL)
|
if (DataLength != NULL)
|
||||||
{
|
{
|
||||||
@ -252,9 +252,7 @@ bool CALLBACK_Audio_Device_GetSetEndpointProperty(USB_ClassInfo_Audio_Device_t*
|
|||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
case AUDIO_REQ_GetCurrent:
|
||||||
else if (EndpointProperty == AUDIO_REQ_GetCurrent)
|
|
||||||
{
|
|
||||||
/* Check if we are just testing for a valid property, or actually reading it */
|
/* Check if we are just testing for a valid property, or actually reading it */
|
||||||
if (DataLength != NULL)
|
if (DataLength != NULL)
|
||||||
{
|
{
|
||||||
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user