Code style fixes for the Device mode USB Audio Class driver to make it more in line with the style of the other library Device Class drivers.

pull/1469/head
Dean Camera 14 years ago
parent 2e6370a6b9
commit a7dd984446

@ -143,27 +143,33 @@ bool Audio_Device_ConfigureEndpoints(USB_ClassInfo_Audio_Device_t* const AudioIn
uint16_t Size; uint16_t Size;
uint8_t Type; uint8_t Type;
uint8_t Direction; uint8_t Direction;
bool DoubleBanked;
if (EndpointNum == AudioInterfaceInfo->Config.DataINEndpointNumber) if (EndpointNum == AudioInterfaceInfo->Config.DataINEndpointNumber)
{ {
Size = AudioInterfaceInfo->Config.DataINEndpointSize; Size = AudioInterfaceInfo->Config.DataINEndpointSize;
Direction = ENDPOINT_DIR_IN; Direction = ENDPOINT_DIR_IN;
Type = EP_TYPE_ISOCHRONOUS; Type = EP_TYPE_ISOCHRONOUS;
DoubleBanked = true;
} }
else if (EndpointNum == AudioInterfaceInfo->Config.DataOUTEndpointNumber) else if (EndpointNum == AudioInterfaceInfo->Config.DataOUTEndpointNumber)
{ {
Size = AudioInterfaceInfo->Config.DataOUTEndpointSize; Size = AudioInterfaceInfo->Config.DataOUTEndpointSize;
Direction = ENDPOINT_DIR_OUT; Direction = ENDPOINT_DIR_OUT;
Type = EP_TYPE_ISOCHRONOUS; Type = EP_TYPE_ISOCHRONOUS;
DoubleBanked = true;
} }
else else
{ {
continue; continue;
} }
if (!(Endpoint_ConfigureEndpoint(EndpointNum, Type, Direction, Size, ENDPOINT_BANK_DOUBLE))) if (!(Endpoint_ConfigureEndpoint(EndpointNum, Type, Direction, Size,
DoubleBanked ? ENDPOINT_BANK_DOUBLE : ENDPOINT_BANK_SINGLE)))
{
return false; return false;
} }
}
return true; return true;
} }

Loading…
Cancel
Save