scsi_data.c 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145
  1. /******************** (C) COPYRIGHT 2009 STMicroelectronics ********************
  2. * File Name : scsi_data.c
  3. * Author : MCD Application Team
  4. * Version : V3.0.1
  5. * Date : 04/27/2009
  6. * Description : Initialization of the SCSI data
  7. ********************************************************************************
  8. * THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
  9. * WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME.
  10. * AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY DIRECT,
  11. * INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE
  12. * CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING
  13. * INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
  14. *******************************************************************************/
  15. /* Includes ------------------------------------------------------------------*/
  16. #include "usb_scsi.h"
  17. #include "memory.h"
  18. uint8_t Page00_Inquiry_Data[] =
  19. {
  20. 0x00, /* PERIPHERAL QUALIFIER & PERIPHERAL DEVICE TYPE*/
  21. 0x00,
  22. 0x00,
  23. 0x00,
  24. 0x00 /* Supported Pages 00*/
  25. };
  26. uint8_t Standard_Inquiry_Data[] =
  27. {
  28. 0x00, /* Direct Access Device */
  29. 0x80, /* RMB = 1: Removable Medium */
  30. 0x02, /* Version: No conformance claim to standard */
  31. 0x02,
  32. 36 - 4, /* Additional Length */
  33. 0x00, /* SCCS = 1: Storage Controller Component */
  34. 0x00,
  35. 0x00,
  36. /* Vendor Identification */
  37. 'S', 'T', 'M', ' ', 'C', 'M', '-', '3',
  38. /* Product Identification */
  39. 'S', 'D', ' ', 'F', 'l', 'a', 's', 'h', ' ',
  40. 'D', 'i', 's', 'k', ' ', ' ', ' ',
  41. /* Product Revision Level */
  42. '1', '.', '0', ' '
  43. };
  44. uint8_t Standard_Inquiry_Data2[] =
  45. {
  46. 0x00, /* Direct Access Device *///磁盘设备
  47. //其中最高位D7为RMB。RMB=0,表示不可移除设备。如果RMB=1,则为可移除设备。
  48. 0x80, /* RMB = 1: Removable Medium */
  49. 0x02, /* Version: No conformance claim to standard */
  50. 0x02, //数据响应格式
  51. 36 - 4, //附加数据长度,为31字节
  52. 0x00, /* SCCS = 1: Storage Controller Component */
  53. 0x00,
  54. 0x00,
  55. /* Vendor Identification */
  56. 'S', 'T', 'M', ' ', ' ', ' ', ' ', ' ',
  57. /* Product Identification */
  58. 'N', 'A', 'N', 'D', ' ', 'F', 'l', 'a', 's', 'h', ' ',
  59. 'D', 'i', 's', 'k', ' ',
  60. /* Product Revision Level */
  61. '1', '.', '0', ' '
  62. };
  63. /*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*/
  64. uint8_t Mode_Sense6_data[] =
  65. {
  66. 0x03,
  67. 0x00,
  68. 0x00,
  69. 0x00,
  70. };
  71. /*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*/
  72. uint8_t Mode_Sense10_data[] =
  73. {
  74. 0x00,
  75. 0x06,
  76. 0x00,
  77. 0x00,
  78. 0x00,
  79. 0x00,
  80. 0x00,
  81. 0x00
  82. };
  83. uint8_t Scsi_Sense_Data[] =
  84. {
  85. 0x70, /*RespCode*/
  86. 0x00, /*SegmentNumber*/
  87. NO_SENSE, /* Sens_Key*/
  88. 0x00,
  89. 0x00,
  90. 0x00,
  91. 0x00, /*Information*/
  92. 0x0A, /*AdditionalSenseLength*/
  93. 0x00,
  94. 0x00,
  95. 0x00,
  96. 0x00, /*CmdInformation*/
  97. NO_SENSE, /*Asc*/
  98. 0x00, /*ASCQ*/
  99. 0x00, /*FRUC*/
  100. 0x00, /*TBD*/
  101. 0x00,
  102. 0x00 /*SenseKeySpecific*/
  103. };
  104. uint8_t ReadCapacity10_Data[] =
  105. {
  106. /* Last Logical Block */
  107. 0,
  108. 0,
  109. 0,
  110. 0,
  111. /* Block Length */
  112. 0,
  113. 0,
  114. 0,
  115. 0
  116. };
  117. uint8_t ReadFormatCapacity_Data [] =
  118. {
  119. 0x00,
  120. 0x00,
  121. 0x00,
  122. 0x08, /* Capacity List Length */
  123. /* Block Count */
  124. 0,
  125. 0,
  126. 0,
  127. 0,
  128. /* Block Length */
  129. 0x02,/* Descriptor Code: Formatted Media */
  130. 0,
  131. 0,
  132. 0
  133. };
  134. /******************* (C) COPYRIGHT 2009 STMicroelectronics *****END OF FILE****/