mirror of
https://github.com/qmk/qmk_firmware.git
synced 2025-07-16 12:51:47 +00:00
Fix errors in the library Host mode Audio Class driver.
This commit is contained in:
parent
e5e34f91fa
commit
6e2a3174a5
@ -215,9 +215,9 @@ uint8_t Audio_GetSetEndpointProperty(USB_ClassInfo_Audio_Host_t* const AudioInte
|
||||
uint8_t EndpointAddress;
|
||||
|
||||
if (EndpointProperty & 0x80)
|
||||
RequestType = (REQDIR_DEVICETOHOST | REQTYPE_CLASS | REQREC_INTERFACE);
|
||||
RequestType = (REQDIR_DEVICETOHOST | REQTYPE_CLASS | REQREC_ENDPOINT);
|
||||
else
|
||||
RequestType = (REQDIR_HOSTTODEVICE | REQTYPE_CLASS | REQREC_INTERFACE);
|
||||
RequestType = (REQDIR_HOSTTODEVICE | REQTYPE_CLASS | REQREC_ENDPOINT);
|
||||
|
||||
Pipe_SelectPipe(DataPipeIndex);
|
||||
EndpointAddress = Pipe_GetBoundEndpointAddress();
|
||||
|
@ -194,10 +194,11 @@
|
||||
|
||||
bool SampleReceived = false;
|
||||
|
||||
Pipe_SelectPipe(AudioInterfaceInfo->Config.DataOUTPipeNumber);
|
||||
Pipe_SelectPipe(AudioInterfaceInfo->Config.DataINPipeNumber);
|
||||
Pipe_Unfreeze();
|
||||
SampleReceived = Pipe_IsINReceived();
|
||||
Pipe_Freeze();
|
||||
|
||||
return SampleReceived;
|
||||
}
|
||||
|
||||
@ -218,7 +219,7 @@
|
||||
if ((USB_HostState != HOST_STATE_Configured) || !(AudioInterfaceInfo->State.IsActive))
|
||||
return false;
|
||||
|
||||
Pipe_SelectPipe(AudioInterfaceInfo->Config.DataINPipeNumber);
|
||||
Pipe_SelectPipe(AudioInterfaceInfo->Config.DataOUTPipeNumber);
|
||||
return Pipe_IsOUTReady();
|
||||
}
|
||||
|
||||
@ -324,7 +325,7 @@
|
||||
{
|
||||
Pipe_Write_8(Sample);
|
||||
|
||||
if (Pipe_BytesInPipe() == AudioInterfaceInfo->State.DataINPipeSize)
|
||||
if (Pipe_BytesInPipe() == AudioInterfaceInfo->State.DataOUTPipeSize)
|
||||
{
|
||||
Pipe_Unfreeze();
|
||||
Pipe_ClearOUT();
|
||||
@ -347,7 +348,7 @@
|
||||
{
|
||||
Pipe_Write_16_LE(Sample);
|
||||
|
||||
if (Pipe_BytesInPipe() == AudioInterfaceInfo->State.DataINPipeSize)
|
||||
if (Pipe_BytesInPipe() == AudioInterfaceInfo->State.DataOUTPipeSize)
|
||||
{
|
||||
Pipe_Unfreeze();
|
||||
Pipe_ClearOUT();
|
||||
@ -371,7 +372,7 @@
|
||||
Pipe_Write_16_LE(Sample);
|
||||
Pipe_Write_8(Sample >> 16);
|
||||
|
||||
if (Pipe_BytesInPipe() == AudioInterfaceInfo->State.DataINPipeSize)
|
||||
if (Pipe_BytesInPipe() == AudioInterfaceInfo->State.DataOUTPipeSize)
|
||||
{
|
||||
Pipe_Unfreeze();
|
||||
Pipe_ClearOUT();
|
||||
|
Loading…
Reference in New Issue
Block a user