keil_examples/USBMem/mscuser.c
/*
 *  MSC SCSI Read Format Capacity Callback
 *    Parameters:      None (global variables)
 *    Return Value:    None
 */
MSC SCSI Read Format Capacity Callback
Parameters:      None (global variables)
Return Value:    None
MSC SCSI Read Format Capacity Callback Parameters : None ( global variables ) Return Value : None
void MSC_ReadFormatCapacity (void) {
  if (!DataInFormat()) return;
  BulkBuf[ 0] = 0x00;
  BulkBuf[ 1] = 0x00;
  BulkBuf[ 2] = 0x00;
  BulkBuf[ 3] = 0x08;                      
  BulkBuf[ 4] = (MSC_BlockCount >> 24) & 0xFF;
  BulkBuf[ 5] = (MSC_BlockCount >> 16) & 0xFF;
  BulkBuf[ 6] = (MSC_BlockCount >>  8) & 0xFF;
  BulkBuf[ 7] = (MSC_BlockCount >>  0) & 0xFF;
  BulkBuf[ 8] = 0x02;                      
  BulkBuf[ 9] = (MSC_BlockSize >> 16) & 0xFF;
  BulkBuf[10] = (MSC_BlockSize >>  8) & 0xFF;
  BulkBuf[11] = (MSC_BlockSize >>  0) & 0xFF;
  BulkLen = 12;
  DataInTransfer();
}
void MSC_ReadFormatCapacity ( void ) { if ( ! DataInFormat ( ) ) return ; BulkBuf [ 0 ] = 0x00 ; BulkBuf [ 1 ] = 0x00 ; BulkBuf [ 2 ] = 0x00 ; BulkBuf [ 3 ] = 0x08 ; BulkBuf [ 4 ] = ( MSC_BlockCount >> 24 ) & 0xFF ; BulkBuf [ 5 ] = ( MSC_BlockCount >> 16 ) & 0xFF ; BulkBuf [ 6 ] = ( MSC_BlockCount >> 8 ) & 0xFF ; BulkBuf [ 7 ] = ( MSC_BlockCount >> 0 ) & 0xFF ; BulkBuf [ 8 ] = 0x02 ; BulkBuf [ 9 ] = ( MSC_BlockSize >> 16 ) & 0xFF ; BulkBuf [ 10 ] = ( MSC_BlockSize >> 8 ) & 0xFF ; BulkBuf [ 11 ] = ( MSC_BlockSize >> 0 ) & 0xFF ; BulkLen = 12 ; DataInTransfer ( ) ; }
MSC SCSI Read Format Capacity Callback
    Parameters:      None (global variables)
    Return Value:    None
MSC SCSI Read Format Capacity Callback Parameters : None ( global variables ) Return Value : None
/* Capacity List Length */ /* Block Count */ /* Block Length */ /* Descriptor Code: Formatted Media */