keil_examples/USBMem/mscuser.c
/*
 *  MSC Bulk Out Callback
 *    Parameters:      None (global variables)
 *    Return Value:    None
 */
MSC Bulk Out Callback
Parameters:      None (global variables)
Return Value:    None
MSC Bulk Out Callback Parameters : None ( global variables ) Return Value : None
void MSC_BulkOut (void) {
  BulkLen = USB_ReadEP(MSC_EP_OUT, BulkBuf);
  switch (BulkStage) {
    case MSC_BS_CBW:
      MSC_GetCBW();
      break;
    case MSC_BS_DATA_OUT:
      switch (CBW.CB[0]) {
        case SCSI_WRITE10:
        case SCSI_WRITE12:
          MSC_MemoryWrite();
          break;
        case SCSI_VERIFY10:
          MSC_MemoryVerify();
          break;
      }
      break;
      case MSC_BS_CSW:
        break;
    default:
      MSC_SetStallEP(MSC_EP_OUT);
      CSW.bStatus = CSW_PHASE_ERROR;
      MSC_SetCSW();
      break;
  }
}
void MSC_BulkOut ( void ) { BulkLen = USB_ReadEP ( MSC_EP_OUT , BulkBuf ) ; switch ( BulkStage ) { case MSC_BS_CBW : MSC_GetCBW ( ) ; break ; case MSC_BS_DATA_OUT : switch ( CBW . CB [ 0 ] ) { case SCSI_WRITE10 : case SCSI_WRITE12 : MSC_MemoryWrite ( ) ; break ; case SCSI_VERIFY10 : MSC_MemoryVerify ( ) ; break ; } break ; case MSC_BS_CSW : break ; default : MSC_SetStallEP ( MSC_EP_OUT ) ; CSW . bStatus = CSW_PHASE_ERROR ; MSC_SetCSW ( ) ; break ; } }
MSC Bulk Out Callback
    Parameters:      None (global variables)
    Return Value:    None
MSC Bulk Out Callback Parameters : None ( global variables ) Return Value : None