/* USBH_MSC_IsReady The function check if the MSC function is ready.  */
uint8_t USBH_MSC_IsReady(USBH_HandleTypeDef *phost)
/* USBH_MSC_IsReady The function check if the MSC function is ready.  */
uint8_t USBH_MSC_IsReady(USBH_HandleTypeDef *phost)
{
	if ((phost->device.is_connected == 0U) || (phost->gState != HOST_CLASS))
	{
		return 0;
	}
	if (phost->pActiveClass == NULL || phost->pActiveClass->pData == NULL)
	{
		return 0;
	}
	MSC_HandleTypeDef *MSC_Handle = (MSC_HandleTypeDef*) phost->pActiveClass->pData;
	uint8_t res;
	if ((phost->gState == HOST_CLASS) && (MSC_Handle->state == MSC_IDLE))
	{
		res = 1U;
	}
	else
	{
		res = 0U;
	}
	return res;
}