Fix const-correctness of the Audio Host Class driver.
USB_HostState = HOST_STATE_WaitForDeviceRemoval;\r
break;\r
}\r
USB_HostState = HOST_STATE_WaitForDeviceRemoval;\r
break;\r
}\r
USB_Audio_SampleFreq_t SampleRate = AUDIO_SAMPLE_FREQ(48000);\r
if (Audio_GetSetEndpointProperty(&Microphone_Audio_Interface, Microphone_Audio_Interface.Config.DataINPipeNumber,\r
AUDIO_REQ_SetCurrent, AUDIO_EPCONTROL_SamplingFreq,\r
USB_Audio_SampleFreq_t SampleRate = AUDIO_SAMPLE_FREQ(48000);\r
if (Audio_GetSetEndpointProperty(&Microphone_Audio_Interface, Microphone_Audio_Interface.Config.DataINPipeNumber,\r
AUDIO_REQ_SetCurrent, AUDIO_EPCONTROL_SamplingFreq,\r
if (DESCRIPTOR_TYPE(ConfigDescriptorData) != DTYPE_Configuration)\r
return AUDIO_ENUMERROR_InvalidConfigDescriptor;\r
\r
if (DESCRIPTOR_TYPE(ConfigDescriptorData) != DTYPE_Configuration)\r
return AUDIO_ENUMERROR_InvalidConfigDescriptor;\r
\r
- while (!(DataINEndpoint) || !(DataOUTEndpoint))\r
+ while ((AudioInterfaceInfo->Config.DataINPipeNumber && !(DataINEndpoint)) ||\r
+ (AudioInterfaceInfo->Config.DataOUTPipeNumber && !(DataOUTEndpoint)))\r
{\r
if (!(AudioControlInterface) ||\r
USB_GetNextDescriptorComp(&ConfigDescriptorSize, &ConfigDescriptorData,\r
{\r
if (!(AudioControlInterface) ||\r
USB_GetNextDescriptorComp(&ConfigDescriptorSize, &ConfigDescriptorData,\r
}\r
\r
AudioStreamingInterface = DESCRIPTOR_PCAST(ConfigDescriptorData, USB_Descriptor_Interface_t);\r
}\r
\r
AudioStreamingInterface = DESCRIPTOR_PCAST(ConfigDescriptorData, USB_Descriptor_Interface_t);\r
+ \r
+ DataINEndpoint = NULL;\r
+ DataOUTEndpoint = NULL;\r
}\r
\r
uint8_t Audio_Host_StartStopStreaming(USB_ClassInfo_Audio_Host_t* const AudioInterfaceInfo,\r
}\r
\r
uint8_t Audio_Host_StartStopStreaming(USB_ClassInfo_Audio_Host_t* const AudioInterfaceInfo,\r
- bool EnableStreaming)\r
+ const bool EnableStreaming)\r
{\r
if (!(AudioInterfaceInfo->State.IsActive))\r
return HOST_SENDCONTROL_DeviceDisconnected;\r
{\r
if (!(AudioInterfaceInfo->State.IsActive))\r
return HOST_SENDCONTROL_DeviceDisconnected;\r
const uint8_t DataPipeIndex,\r
const uint8_t EndpointProperty,\r
const uint8_t EndpointControl,\r
const uint8_t DataPipeIndex,\r
const uint8_t EndpointProperty,\r
const uint8_t EndpointControl,\r
- uint16_t const DataLength,\r
+ const uint16_t DataLength,\r
void* const Data)\r
{\r
if (!(AudioInterfaceInfo->State.IsActive))\r
void* const Data)\r
{\r
if (!(AudioInterfaceInfo->State.IsActive))\r
* \return A value from the \ref USB_Host_SendControlErrorCodes_t enum.\r
*/\r
uint8_t Audio_Host_StartStopStreaming(USB_ClassInfo_Audio_Host_t* const AudioInterfaceInfo,\r
* \return A value from the \ref USB_Host_SendControlErrorCodes_t enum.\r
*/\r
uint8_t Audio_Host_StartStopStreaming(USB_ClassInfo_Audio_Host_t* const AudioInterfaceInfo,\r
- bool EnableStreaming);\r
+ const bool EnableStreaming);\r
\r
/** Gets or sets the specified property of a streaming audio class endpoint that is bound to a pipe in the given\r
* class instance.\r
\r
/** Gets or sets the specified property of a streaming audio class endpoint that is bound to a pipe in the given\r
* class instance.\r
const uint8_t DataPipeIndex,\r
const uint8_t EndpointProperty,\r
const uint8_t EndpointControl,\r
const uint8_t DataPipeIndex,\r
const uint8_t EndpointProperty,\r
const uint8_t EndpointControl,\r
- uint16_t const DataLength,\r
+ const uint16_t DataLength,\r
void* const Data);\r
\r
/* Inline Functions: */\r
void* const Data);\r
\r
/* Inline Functions: */\r