My Marlin configs for Fabrikator Mini and CTC i3 Pro B
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

mscuser.h 2.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. /*----------------------------------------------------------------------------
  2. * U S B - K e r n e l
  3. *----------------------------------------------------------------------------
  4. * Name: MSCUSER.H
  5. * Purpose: Mass Storage Class Custom User Definitions
  6. * Version: V1.10
  7. *----------------------------------------------------------------------------
  8. * This software is supplied "AS IS" without any warranties, express,
  9. * implied or statutory, including but not limited to the implied
  10. * warranties of fitness for purpose, satisfactory quality and
  11. * noninfringement. Keil extends you a royalty-free right to reproduce
  12. * and distribute executable files created using this software for use
  13. * on NXP Semiconductors LPC family microcontroller devices only. Nothing
  14. * else gives you the right to use this software.
  15. *
  16. * Copyright (c) 2005-2009 Keil Software.
  17. *---------------------------------------------------------------------------*/
  18. #ifndef __MSCUSER_H__
  19. #define __MSCUSER_H__
  20. /* Max In/Out Packet Size */
  21. #define MSC_MAX_PACKET 64
  22. #define MSC_BLOCK_SIZE 512
  23. /* MSC In/Out Endpoint Address */
  24. #define MSC_EP_IN 0x85
  25. #define MSC_EP_OUT 0x05
  26. /* MSC Requests Callback Functions */
  27. extern uint32_t MSC_Reset (void);
  28. extern uint32_t MSC_GetMaxLUN (void);
  29. /* MSC Bulk Callback Functions */
  30. extern void MSC_GetCBW (void);
  31. extern void MSC_SetCSW (void);
  32. extern void MSC_BulkIn (void);
  33. extern void MSC_BulkOut(void);
  34. enum class Sense_KEY : uint8_t {
  35. NO_SENSE,
  36. RECOVERED_ERROR,
  37. NOT_READY,
  38. MEDIUM_ERROR,
  39. HARDWARE_ERROR,
  40. ILLEGAL_REQUEST,
  41. UNIT_ATTENTION,
  42. DATA_PROTECT
  43. };
  44. enum class Sense_ASC : uint8_t {
  45. CANNOT_READ_MEDIUM = 0x30,
  46. MEDIUM_NOT_PRESENT = 0x3A
  47. };
  48. enum class Sense_ASCQ : uint8_t {
  49. // CANNOT_READ_MEDIUM
  50. UNKNOWN_FORMAT = 0x01,
  51. // MEDIUM_NOT_PRESENT
  52. REASON_UNKNOWN = 0x00,
  53. TRAY_CLOSED,
  54. TRAY_OPEN,
  55. LOADABLE,
  56. AUXILIARY_MEMORY_ACCESSIBLE
  57. };
  58. #endif /* __MSCUSER_H__ */