mstorage.h 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. /*
  2. * File : mstorage.h
  3. * This file is part of RT-Thread RTOS
  4. * COPYRIGHT (C) 2012, RT-Thread Development Team
  5. *
  6. * The license and distribution terms for this file may be
  7. * found in the file LICENSE in this distribution or at
  8. * http://www.rt-thread.org/license/LICENSE
  9. *
  10. * Change Logs:
  11. * Date Author Notes
  12. * 2012-10-01 Yi Qiu first version
  13. * 2012-12-12 heyuanjie87 add MASS endpoints collection
  14. */
  15. #ifndef __MSTORAGE_H__
  16. #define __MSTORAGE_H__
  17. #include <rtthread.h>
  18. #pragma pack(1)
  19. struct umass_descriptor
  20. {
  21. struct uinterface_descriptor intf_desc;
  22. struct uendpoint_descriptor ep_out_desc;
  23. struct uendpoint_descriptor ep_in_desc;
  24. };
  25. typedef struct umass_descriptor* umass_desc_t;
  26. struct capacity_data
  27. {
  28. rt_uint8_t LastLogicalBlockAddress[4];
  29. rt_uint8_t BlockLengthInBytes[4];
  30. };
  31. struct request_sense_data
  32. {
  33. rt_uint8_t ErrorCode:7;
  34. rt_uint8_t Valid:1;
  35. rt_uint8_t Reserved1;
  36. rt_uint8_t SenseKey:4;
  37. rt_uint8_t Reserved2:4;
  38. rt_uint8_t Information[4];
  39. rt_uint8_t AdditionalSenseLength;
  40. rt_uint8_t Reserved3[4];
  41. rt_uint8_t AdditionalSenseCode;
  42. rt_uint8_t AdditionalSenseCodeQualifier;
  43. rt_uint8_t Reserved4[4];
  44. }request_sense_data_t;
  45. struct mass_eps
  46. {
  47. uep_t ep_in;
  48. uep_t ep_out;
  49. };
  50. typedef struct mass_eps* mass_eps_t;
  51. #pragma pack()
  52. #endif