Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of MSCFileSystem by
usbhost_ms.h
00001 /* 00002 ************************************************************************************************************** 00003 * NXP USB Host Stack 00004 * 00005 * (c) Copyright 2008, NXP SemiConductors 00006 * (c) Copyright 2008, OnChip Technologies LLC 00007 * All Rights Reserved 00008 * 00009 * www.nxp.com 00010 * www.onchiptech.com 00011 * 00012 * File : usbhost_ms.h 00013 * Programmer(s) : Ravikanth.P 00014 * Version : 00015 * 00016 ************************************************************************************************************** 00017 */ 00018 00019 #ifndef USBHOST_MS_H 00020 #define USBHOST_MS_H 00021 00022 /* 00023 ************************************************************************************************************** 00024 * INCLUDE HEADER FILES 00025 ************************************************************************************************************** 00026 */ 00027 00028 #include "usbhost_inc.h" 00029 00030 /* 00031 ************************************************************************************************************** 00032 * MASS STORAGE SPECIFIC DEFINITIONS 00033 ************************************************************************************************************** 00034 */ 00035 00036 #define MS_GET_MAX_LUN_REQ 0xFE 00037 #define MASS_STORAGE_CLASS 0x08 00038 #define MASS_STORAGE_SUBCLASS_SCSI 0x06 00039 #define MASS_STORAGE_PROTOCOL_BO 0x50 00040 00041 #define INQUIRY_LENGTH 36 00042 /* 00043 ************************************************************************************************************** 00044 * SCSI SPECIFIC DEFINITIONS 00045 ************************************************************************************************************** 00046 */ 00047 00048 #define CBW_SIGNATURE 0x43425355 00049 #define CSW_SIGNATURE 0x53425355 00050 #define CBW_SIZE 31 00051 #define CSW_SIZE 13 00052 #define CSW_CMD_PASSED 0x00 00053 #define SCSI_CMD_REQUEST_SENSE 0x03 00054 #define SCSI_CMD_TEST_UNIT_READY 0x00 00055 #define SCSI_CMD_INQUIRY 0x12 00056 #define SCSI_CMD_READ_10 0x28 00057 #define SCSI_CMD_READ_CAPACITY 0x25 00058 #define SCSI_CMD_WRITE_10 0x2A 00059 00060 /* 00061 ************************************************************************************************************** 00062 * TYPE DEFINITIONS 00063 ************************************************************************************************************** 00064 */ 00065 00066 typedef enum ms_data_dir { 00067 00068 MS_DATA_DIR_IN = 0x80, 00069 MS_DATA_DIR_OUT = 0x00, 00070 MS_DATA_DIR_NONE = 0x01 00071 00072 } MS_DATA_DIR; 00073 00074 /* 00075 ************************************************************************************************************** 00076 * FUNCTION PROTOTYPES 00077 ************************************************************************************************************** 00078 */ 00079 00080 USB_INT32S MS_BulkRecv ( USB_INT32U block_number, 00081 USB_INT16U num_blocks, 00082 volatile USB_INT08U *user_buffer); 00083 00084 USB_INT32S MS_BulkSend ( USB_INT32U block_number, 00085 USB_INT16U num_blocks, 00086 volatile USB_INT08U *user_buffer); 00087 USB_INT32S MS_ParseConfiguration(void); 00088 USB_INT32S MS_TestUnitReady (void); 00089 USB_INT32S MS_ReadCapacity (USB_INT32U *numBlks, USB_INT32U *blkSize); 00090 USB_INT32S MS_GetMaxLUN (void); 00091 USB_INT32S MS_GetSenseInfo (void); 00092 USB_INT32S MS_Init (USB_INT32U *blkSize, USB_INT32U *numBlks, USB_INT08U *inquiryResult); 00093 USB_INT32S MS_Inquire (USB_INT08U *response); 00094 00095 void Fill_MSCommand ( USB_INT32U block_number, 00096 USB_INT32U block_size, 00097 USB_INT16U num_blocks, 00098 MS_DATA_DIR direction, 00099 USB_INT08U scsi_cmd, 00100 USB_INT08U scsi_cmd_len); 00101 #endif
Generated on Wed Jul 13 2022 18:06:37 by
1.7.2
