/* USB Device Endpoint 0 Event Callback - MSC specific handling (Setup Request To Interface) Parameters: none Return Value: TRUE - Setup class request ok, FALSE - Setup class request not supported  */
__WEAK BOOL USBD_EndPoint0_Setup_MSC_ReqToIF(void)
/* USB Device Endpoint 0 Event Callback - MSC specific handling (Setup Request To Interface) Parameters: none Return Value: TRUE - Setup class request ok, FALSE - Setup class request not supported  */
__WEAK BOOL USBD_EndPoint0_Setup_MSC_ReqToIF(void)
{
    if (USBD_SetupPacket.wIndexL == usbd_msc_if_num) {
        switch (USBD_SetupPacket.bRequest) {
            case MSC_REQUEST_RESET:
                if ((USBD_SetupPacket.wValue   == 0) &&
                        (USBD_SetupPacket.wLength  == 0)) {
                    if (USBD_MSC_Reset()) {
                        USBD_StatusInStage();
                        return (__TRUE);
                    }
                }
                break;
            case MSC_REQUEST_GET_MAX_LUN:
                if ((USBD_SetupPacket.wValue   == 0) &&
                        (USBD_SetupPacket.wLength  == 1)) {
                    if (USBD_MSC_GetMaxLUN()) {
                        USBD_EP0Data.pData = USBD_EP0Buf;
                        USBD_DataInStage();
                        return (__TRUE);
                    }
                }
                break;
        }
    }
    return (__FALSE);
}