/* Retuns the USB status depending on the HAL status:  */
USBH_StatusTypeDef USBH_Get_USB_Status(HAL_StatusTypeDef hal_status)
/* Retuns the USB status depending on the HAL status:  */
USBH_StatusTypeDef USBH_Get_USB_Status(HAL_StatusTypeDef hal_status)
{
    case HAL_OK:
        usb_status = USBH_OK;
        break;
    case HAL_ERROR:
        usb_status = USBH_FAIL;
        break;
    case HAL_BUSY:
        usb_status = USBH_BUSY;
        break;
    case HAL_TIMEOUT:
        usb_status = USBH_FAIL;
        break;
    default:
        usb_status = USBH_FAIL;
        break;
    }
    return usb_status;
}