SBC_ProcessCommand
Default mainpageat91libusbdevicemassstorageSBC_ProcessCommand
Description Source Call Graph
Start Line: 1000
unsigned char SBC_ProcessCommand(MSDLun *lun, MSDCommandState *commandState)
                                     {
    //---------------
    case SBC_READ_10:
    //---------------
        TRACE_INFO_WP("Read(10) ");

        // Perform the Read10 command
        result = SBC_Read10(lun, commandState);
        break;

    //----------------
    case SBC_WRITE_10:
    //----------------
        TRACE_INFO_WP("Write(10) ");

        // Perform the Write10 command
        result = SBC_Write10(lun, commandState);
        break;

    //---------------------
    case SBC_READ_CAPACITY_10:
    //---------------------
        TRACE_INFO_WP("RdCapacity(10) ");

        // Perform the ReadCapacity command
        result = SBC_ReadCapacity10(lun, commandState);
        break;

    //---------------------
    case SBC_VERIFY_10:
    //---------------------
        TRACE_INFO_WP("Verify(10) ");

        // Flush media
        MED_Flush(lun->media);
        result = MSDD_STATUS_SUCCESS;
        break;

    //---------------
    case SBC_INQUIRY:
    //---------------
        TRACE_INFO_WP("Inquiry ");

        // Process Inquiry command
        result = SBC_Inquiry(lun, commandState);
        break;

    //--------------------
    case SBC_MODE_SENSE_6:
    //--------------------
        TRACE_INFO_WP("ModeSense(6) ");

        // Process ModeSense6 command
        result = SBC_ModeSense6(commandState);
        break;

    //-----------------------
    case SBC_TEST_UNIT_READY:
    //-----------------------
        TRACE_INFO_WP("TstUnitRdy ");

        // Process TestUnitReady command
        //MED_Flush(lun->media);
        result = SBC_TestUnitReady(lun);
        break;

    //---------------------
    case SBC_REQUEST_SENSE:
    //---------------------
        TRACE_INFO_WP("ReqSense ");

        // Perform the RequestSense command
        result = SBC_RequestSense(lun, commandState);
        break;

    //------------------------------------
    case SBC_PREVENT_ALLOW_MEDIUM_REMOVAL:
    //------------------------------------
        TRACE_INFO_WP("PrevAllowRem ");

        // Nothing to do
        result = MSDD_STATUS_SUCCESS;
        break;

    //------
    default:
    //------
        result = MSDD_STATUS_PARAMETER;
    }

    return result;
}