mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2026-04-26 03:39:58 -07:00
New formatting
This commit is contained in:
@@ -4,16 +4,16 @@
|
||||
|
||||
#define TAG "MassStorageSCSI"
|
||||
|
||||
#define SCSI_TEST_UNIT_READY (0x00)
|
||||
#define SCSI_REQUEST_SENSE (0x03)
|
||||
#define SCSI_INQUIRY (0x12)
|
||||
#define SCSI_TEST_UNIT_READY (0x00)
|
||||
#define SCSI_REQUEST_SENSE (0x03)
|
||||
#define SCSI_INQUIRY (0x12)
|
||||
#define SCSI_READ_FORMAT_CAPACITIES (0x23)
|
||||
#define SCSI_READ_CAPACITY_10 (0x25)
|
||||
#define SCSI_MODE_SENSE_6 (0x1A)
|
||||
#define SCSI_READ_10 (0x28)
|
||||
#define SCSI_READ_CAPACITY_10 (0x25)
|
||||
#define SCSI_MODE_SENSE_6 (0x1A)
|
||||
#define SCSI_READ_10 (0x28)
|
||||
#define SCSI_PREVENT_MEDIUM_REMOVAL (0x1E)
|
||||
#define SCSI_START_STOP_UNIT (0x1B)
|
||||
#define SCSI_WRITE_10 (0x2A)
|
||||
#define SCSI_START_STOP_UNIT (0x1B)
|
||||
#define SCSI_WRITE_10 (0x2A)
|
||||
|
||||
bool scsi_cmd_start(SCSISession* scsi, uint8_t* cmd, uint8_t len) {
|
||||
if(!len) {
|
||||
|
||||
@@ -7,8 +7,8 @@
|
||||
#define SCSI_SK_ILLEGAL_REQUEST (5)
|
||||
|
||||
#define SCSI_ASC_INVALID_COMMAND_OPERATION_CODE (0x20)
|
||||
#define SCSI_ASC_LBA_OOB (0x21)
|
||||
#define SCSI_ASC_INVALID_FIELD_IN_CDB (0x24)
|
||||
#define SCSI_ASC_LBA_OOB (0x21)
|
||||
#define SCSI_ASC_INVALID_FIELD_IN_CDB (0x24)
|
||||
|
||||
typedef struct {
|
||||
void* ctx;
|
||||
@@ -53,4 +53,4 @@ typedef struct {
|
||||
bool scsi_cmd_start(SCSISession* scsi, uint8_t* cmd, uint8_t len);
|
||||
bool scsi_cmd_rx_data(SCSISession* scsi, uint8_t* data, uint32_t len);
|
||||
bool scsi_cmd_tx_data(SCSISession* scsi, uint8_t* data, uint32_t* len, uint32_t cap);
|
||||
bool scsi_cmd_end(SCSISession* scsi);
|
||||
bool scsi_cmd_end(SCSISession* scsi);
|
||||
|
||||
@@ -10,14 +10,14 @@
|
||||
#define USB_MSC_TX_EP_SIZE (64UL)
|
||||
|
||||
#define USB_MSC_BOT_GET_MAX_LUN (0xFE)
|
||||
#define USB_MSC_BOT_RESET (0xFF)
|
||||
#define USB_MSC_BOT_RESET (0xFF)
|
||||
|
||||
#define CBW_SIG (0x43425355)
|
||||
#define CBW_SIG (0x43425355)
|
||||
#define CBW_FLAGS_DEVICE_TO_HOST (0x80)
|
||||
|
||||
#define CSW_SIG (0x53425355)
|
||||
#define CSW_STATUS_OK (0)
|
||||
#define CSW_STATUS_NOK (1)
|
||||
#define CSW_SIG (0x53425355)
|
||||
#define CSW_STATUS_OK (0)
|
||||
#define CSW_STATUS_NOK (1)
|
||||
#define CSW_STATUS_PHASE_ERROR (2)
|
||||
|
||||
// must be SCSI_BLOCK_SIZE aligned
|
||||
|
||||
Reference in New Issue
Block a user