mstorage.h 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. /*
  2. * Copyright (c) 2006-2021, RT-Thread Development Team
  3. *
  4. * SPDX-License-Identifier: Apache-2.0
  5. *
  6. * Change Logs:
  7. * Date Author Notes
  8. * 2012-10-01 Yi Qiu first version
  9. * 2012-12-12 heyuanjie87 add MASS endpoints collection
  10. */
  11. #ifndef __MSTORAGE_H__
  12. #define __MSTORAGE_H__
  13. #include <rtthread.h>
  14. #pragma pack(1)
  15. struct umass_descriptor
  16. {
  17. #ifdef RT_USB_DEVICE_COMPOSITE
  18. struct uiad_descriptor iad_desc;
  19. #endif
  20. struct uinterface_descriptor intf_desc;
  21. struct uendpoint_descriptor ep_out_desc;
  22. struct uendpoint_descriptor ep_in_desc;
  23. };
  24. typedef struct umass_descriptor* umass_desc_t;
  25. struct capacity_data
  26. {
  27. rt_uint8_t LastLogicalBlockAddress[4];
  28. rt_uint8_t BlockLengthInBytes[4];
  29. };
  30. struct request_sense_data
  31. {
  32. rt_uint8_t ErrorCode:7;
  33. rt_uint8_t Valid:1;
  34. rt_uint8_t Reserved1;
  35. rt_uint8_t SenseKey:4;
  36. rt_uint8_t Reserved2:4;
  37. rt_uint8_t Information[4];
  38. rt_uint8_t AdditionalSenseLength;
  39. rt_uint8_t Reserved3[4];
  40. rt_uint8_t AdditionalSenseCode;
  41. rt_uint8_t AdditionalSenseCodeQualifier;
  42. rt_uint8_t Reserved4[4];
  43. }request_sense_data_t;
  44. #pragma pack()
  45. #endif