diff options
| author | hathach <[email protected]> | 2013-09-25 16:20:38 +0700 |
|---|---|---|
| committer | hathach <[email protected]> | 2013-09-25 16:20:38 +0700 |
| commit | 1fee50b9fe64c32f62baa8f96e1fa3687fa7da5d (patch) | |
| tree | def8c534d35e86c914da89517d6ecd3334a51716 /tinyusb/class/msc.h | |
| parent | cf65f859be27d71fb64c1c0bca07585f4df37f75 (diff) | |
add tusbh_msc_status
reanme PRINTF_TARGET_DEBUG_CONSOLE to PRINTF_TARGET_SEMIHOST
add read10 implementation
able to read fat root sector
Diffstat (limited to 'tinyusb/class/msc.h')
| -rw-r--r-- | tinyusb/class/msc.h | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/tinyusb/class/msc.h b/tinyusb/class/msc.h index dd4c222fb..fea1702a0 100644 --- a/tinyusb/class/msc.h +++ b/tinyusb/class/msc.h @@ -64,6 +64,10 @@ enum { MSC_SUBCLASS_SCSI }; +enum { + MSC_CBW_SIGNATURE = 0x43425355, +}; + // CBI only approved to use with full-speed floopy disk & should not used with highspeed or device other than floopy enum { MSC_PROTOCOL_CBI = 0, @@ -171,13 +175,16 @@ typedef ATTR_PACKED_STRUCT(struct) STATIC_ASSERT(sizeof(scsi_inquiry_data_t) == 36, "size is not correct"); +// test unit ready + //--------------------------------------------------------------------+ // SCSI Block Command (SBC-3) +// NOTE: All data in SCSI command are in Big Endian //--------------------------------------------------------------------+ typedef ATTR_PACKED_STRUCT(struct) { uint8_t cmd_code; uint8_t reserved1; - uint32_t logical_block_addr; + uint32_t lba; uint16_t reserved2; uint8_t partial_medium_indicator; uint8_t control; @@ -192,6 +199,19 @@ typedef struct { STATIC_ASSERT(sizeof(scsi_read_capacity10_data_t) == 8, "size is not correct"); +typedef ATTR_PACKED_STRUCT(struct) { + uint8_t cmd_code; + uint8_t reserved; // has LUN according to wiki + uint32_t lba; + uint8_t reserved2; + uint16_t block_count; + uint8_t control; +} scsi_read10_t; + +STATIC_ASSERT(sizeof(scsi_read10_t) == 10, "size is not correct"); + + + #ifdef __cplusplus } #endif |
