/* USB Device Check Data IN Format Parameters: None Return Value: TRUE - Success, FALSE - Error  */
BOOL USBD_MSC_DataInFormat(void)
/* USB Device Check Data IN Format Parameters: None Return Value: TRUE - Success, FALSE - Error  */
BOOL USBD_MSC_DataInFormat(void)
{
    if (USBD_MSC_CBW.dDataLength == 0) {
        USBD_MSC_CSW.bStatus = CSW_PHASE_ERROR;
        USBD_MSC_SetCSW();
        return (__FALSE);
    }
    if ((USBD_MSC_CBW.bmFlags & 0x80) == 0) {
        USBD_MSC_SetStallEP(usbd_msc_ep_bulkout);
        USBD_MSC_CSW.bStatus = CSW_PHASE_ERROR;
        USBD_MSC_SetCSW();
        return (__FALSE);
    }
    return (__TRUE);
}