---------------------------------------------------------------------
        if(strcmp((const char *)eventData, SYS_FS_MEDIA_IDX1_MOUNT_NAME_VOLUME_IDX0) == 0)
        {
            SYS_CMD_MESSAGE("Mount USB Mass Storage success!\r\n");
        }

---------------------------------------------------------------------
        if(strcmp((const char *)eventData, SYS_FS_MEDIA_IDX1_MOUNT_NAME_VOLUME_IDX0) == 0)
        {
            SYS_CMD_MESSAGE("Unmount USB Mass Storage!\r\n");
        }

---------------------------------------------------------------------
void CommandMedia(SYS_CMD_DEVICE_NODE* pCmdIO, int argc, char** argv)
{
    if(!strcmp( argv[1], "SD"))
    {
        strcpy(fMedia, SYS_FS_MEDIA_IDX0_DEVICE_NAME_VOLUME_IDX0);
        strcpy(fDrive, SYS_FS_MEDIA_IDX0_MOUNT_NAME_VOLUME_IDX0);
    }
    if(!strcmp( argv[1], "USB"))
    {
        strcpy(fMedia, SYS_FS_MEDIA_IDX1_DEVICE_NAME_VOLUME_IDX0);
        strcpy(fDrive, SYS_FS_MEDIA_IDX1_MOUNT_NAME_VOLUME_IDX0);
    }

    SYS_CMD_PRINT("Set media to %s\r\n", fMedia);

    if(SYS_FS_CurrentDriveSet(fDrive) != SYS_FS_RES_SUCCESS)
    {
        SYS_CMD_PRINT("Drive %s not mounted!\r\n", fDrive);
        return;
    }

    SYS_CMD_PRINT("Set drive to %s\r\n", fDrive);
}

---------------------------------------------------------------------
    { "media", CommandMedia, ": media %" },

---------------------------------------------------------------------
USB_HOST_EVENT_RESPONSE USBHostEventHandler(USB_HOST_EVENT event, void * eventData, uintptr_t context)
{
    switch (event)
    {
	case USB_HOST_EVENT_DEVICE_REJECTED_INSUFFICIENT_POWER: break;
	case USB_HOST_EVENT_DEVICE_UNSUPPORTED: break;
	case USB_HOST_EVENT_HUB_TIER_LEVEL_EXCEEDED: break;
	case USB_HOST_EVENT_PORT_OVERCURRENT_DETECTED: break;
    }
    
    return(USB_HOST_EVENT_RESPONSE_NONE);
}

---------------------------------------------------------------------
    USB_HOST_EventHandlerSet(USBHostEventHandler, (uintptr_t)NULL);
	
    USB_HOST_BusEnable(0);

---------------------------------------------------------------------