usbd_msc_data.c 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. /*!
  2. \file usbd_msc_data.c
  3. \brief USB MSC vital inquiry pages and sense data
  4. \version 2020-07-28, V3.0.0, firmware for GD32F20x
  5. \version 2021-07-30, V3.1.0, firmware for GD32F20x
  6. */
  7. /*
  8. Copyright (c) 2021, GigaDevice Semiconductor Inc.
  9. Redistribution and use in source and binary forms, with or without modification,
  10. are permitted provided that the following conditions are met:
  11. 1. Redistributions of source code must retain the above copyright notice, this
  12. list of conditions and the following disclaimer.
  13. 2. Redistributions in binary form must reproduce the above copyright notice,
  14. this list of conditions and the following disclaimer in the documentation
  15. and/or other materials provided with the distribution.
  16. 3. Neither the name of the copyright holder nor the names of its contributors
  17. may be used to endorse or promote products derived from this software without
  18. specific prior written permission.
  19. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
  20. AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
  21. WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
  22. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
  23. INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
  24. NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
  25. PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
  26. WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
  27. ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
  28. OF SUCH DAMAGE.
  29. */
  30. #include "usbd_msc_data.h"
  31. /* USB mass storage page 0 inquiry data */
  32. const uint8_t msc_page00_inquiry_data[] = {
  33. 0x00U,
  34. 0x00U,
  35. 0x00U,
  36. 0x00U,
  37. (INQUIRY_PAGE00_LENGTH - 4U),
  38. 0x80U,
  39. 0x83U,
  40. };
  41. /* USB mass storage sense 6 data */
  42. const uint8_t msc_mode_sense6_data[] = {
  43. 0x00U,
  44. 0x00U,
  45. 0x00U,
  46. 0x00U,
  47. 0x00U,
  48. 0x00U,
  49. 0x00U,
  50. 0x00U
  51. };
  52. /* USB mass storage sense 10 data */
  53. const uint8_t msc_mode_sense10_data[] = {
  54. 0x00U,
  55. 0x06U,
  56. 0x00U,
  57. 0x00U,
  58. 0x00U,
  59. 0x00U,
  60. 0x00U,
  61. 0x00U
  62. };