LUFAConfig.h 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126
  1. /*
  2. LUFA Library
  3. Copyright (C) Dean Camera, 2018.
  4. dean [at] fourwalledcubicle [dot] com
  5. www.lufa-lib.org
  6. */
  7. /*
  8. Copyright 2018 Dean Camera (dean [at] fourwalledcubicle [dot] com)
  9. Permission to use, copy, modify, distribute, and sell this
  10. software and its documentation for any purpose is hereby granted
  11. without fee, provided that the above copyright notice appear in
  12. all copies and that both that the copyright notice and this
  13. permission notice and warranty disclaimer appear in supporting
  14. documentation, and that the name of the author not be used in
  15. advertising or publicity pertaining to distribution of the
  16. software without specific, written prior permission.
  17. The author disclaims all warranties with regard to this
  18. software, including all implied warranties of merchantability
  19. and fitness. In no event shall the author be liable for any
  20. special, indirect or consequential damages or any damages
  21. whatsoever resulting from loss of use, data or profits, whether
  22. in an action of contract, negligence or other tortious action,
  23. arising out of or in connection with the use or performance of
  24. this software.
  25. */
  26. /** \file
  27. * \brief LUFA Library Configuration Header File
  28. *
  29. * This header file is used to configure LUFA's compile time options,
  30. * as an alternative to the compile time constants supplied through
  31. * a makefile.
  32. *
  33. * For information on what each token does, refer to the LUFA
  34. * manual section "Summary of Compile Tokens".
  35. */
  36. #ifndef _LUFA_CONFIG_H_
  37. #define _LUFA_CONFIG_H_
  38. #if (ARCH == ARCH_AVR8)
  39. /* Non-USB Related Configuration Tokens: */
  40. // #define DISABLE_TERMINAL_CODES
  41. /* USB Class Driver Related Tokens: */
  42. // #define HID_HOST_BOOT_PROTOCOL_ONLY
  43. // #define HID_STATETABLE_STACK_DEPTH {Insert Value Here}
  44. // #define HID_USAGE_STACK_DEPTH {Insert Value Here}
  45. // #define HID_MAX_COLLECTIONS {Insert Value Here}
  46. // #define HID_MAX_REPORTITEMS {Insert Value Here}
  47. // #define HID_MAX_REPORT_IDS {Insert Value Here}
  48. // #define NO_CLASS_DRIVER_AUTOFLUSH
  49. /* General USB Driver Related Tokens: */
  50. // #define ORDERED_EP_CONFIG
  51. #define USE_STATIC_OPTIONS (USB_DEVICE_OPT_FULLSPEED | USB_OPT_REG_ENABLED | USB_OPT_AUTO_PLL)
  52. #define USB_DEVICE_ONLY
  53. // #define USB_HOST_ONLY
  54. // #define USB_STREAM_TIMEOUT_MS {Insert Value Here}
  55. // #define NO_LIMITED_CONTROLLER_CONNECT
  56. // #define NO_SOF_EVENTS
  57. /* USB Device Mode Driver Related Tokens: */
  58. // #define USE_RAM_DESCRIPTORS
  59. #define USE_FLASH_DESCRIPTORS
  60. // #define USE_EEPROM_DESCRIPTORS
  61. // #define NO_INTERNAL_SERIAL
  62. #define FIXED_CONTROL_ENDPOINT_SIZE 8
  63. // #define DEVICE_STATE_AS_GPIOR {Insert Value Here}
  64. #define FIXED_NUM_CONFIGURATIONS 1
  65. // #define CONTROL_ONLY_DEVICE
  66. // #define INTERRUPT_CONTROL_ENDPOINT
  67. // #define NO_DEVICE_REMOTE_WAKEUP
  68. // #define NO_DEVICE_SELF_POWER
  69. /* USB Host Mode Driver Related Tokens: */
  70. // #define HOST_STATE_AS_GPIOR {Insert Value Here}
  71. // #define USB_HOST_TIMEOUT_MS {Insert Value Here}
  72. // #define HOST_DEVICE_SETTLE_DELAY_MS {Insert Value Here}
  73. // #define NO_AUTO_VBUS_MANAGEMENT
  74. // #define INVERTED_VBUS_ENABLE_LINE
  75. #elif (ARCH == ARCH_XMEGA)
  76. /* Non-USB Related Configuration Tokens: */
  77. // #define DISABLE_TERMINAL_CODES
  78. /* USB Class Driver Related Tokens: */
  79. // #define HID_HOST_BOOT_PROTOCOL_ONLY
  80. // #define HID_STATETABLE_STACK_DEPTH {Insert Value Here}
  81. // #define HID_USAGE_STACK_DEPTH {Insert Value Here}
  82. // #define HID_MAX_COLLECTIONS {Insert Value Here}
  83. // #define HID_MAX_REPORTITEMS {Insert Value Here}
  84. // #define HID_MAX_REPORT_IDS {Insert Value Here}
  85. // #define NO_CLASS_DRIVER_AUTOFLUSH
  86. /* General USB Driver Related Tokens: */
  87. #define USE_STATIC_OPTIONS (USB_DEVICE_OPT_FULLSPEED | USB_OPT_RC32MCLKSRC | USB_OPT_BUSEVENT_PRIHIGH)
  88. // #define USB_STREAM_TIMEOUT_MS {Insert Value Here}
  89. // #define NO_LIMITED_CONTROLLER_CONNECT
  90. // #define NO_SOF_EVENTS
  91. /* USB Device Mode Driver Related Tokens: */
  92. // #define USE_RAM_DESCRIPTORS
  93. #define USE_FLASH_DESCRIPTORS
  94. // #define USE_EEPROM_DESCRIPTORS
  95. // #define NO_INTERNAL_SERIAL
  96. #define FIXED_CONTROL_ENDPOINT_SIZE 8
  97. // #define DEVICE_STATE_AS_GPIOR {Insert Value Here}
  98. #define FIXED_NUM_CONFIGURATIONS 1
  99. // #define CONTROL_ONLY_DEVICE
  100. #define MAX_ENDPOINT_INDEX 1
  101. // #define NO_DEVICE_REMOTE_WAKEUP
  102. // #define NO_DEVICE_SELF_POWER
  103. #else
  104. #error Unsupported architecture for this LUFA configuration file.
  105. #endif
  106. #endif