usbd_conf.h 988 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. /*!
  2. \file usbd_conf.h
  3. \brief USBFS device-mode configuration header file
  4. */
  5. /*
  6. Copyright (C) 2017 GigaDevice
  7. 2017-06-06, V1.0.0, firmware for GD32F3x0
  8. */
  9. #ifndef USBD_CONF_H
  10. #define USBD_CONF_H
  11. #include "usb_conf.h"
  12. #define USBD_CFG_MAX_NUM 1
  13. #define USBD_ITF_MAX_NUM 1
  14. #define USB_STR_DESC_MAX_SIZE 64
  15. /* USB feature -- Self Powered */
  16. #define USBD_SELF_POWERED
  17. #define USB_STRING_COUNT 4
  18. /* class layer parameter */
  19. #define PRINTER_IN_EP EP1_IN
  20. #define PRINTER_OUT_EP EP1_OUT
  21. #ifdef USE_USBHS
  22. #ifdef USE_ULPI_PHY
  23. #define PRINTER_DATA_PACKET_SIZE 512
  24. #else
  25. #define PRINTER_DATA_PACKET_SIZE 64
  26. #endif
  27. #else /* USE_USBFS */
  28. #define PRINTER_DATA_PACKET_SIZE 64
  29. #endif
  30. #define PRINTER_IN_PACKET PRINTER_DATA_PACKET_SIZE
  31. #define PRINTER_OUT_PACKET PRINTER_DATA_PACKET_SIZE
  32. #endif /* USBD_CONF_H */