You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.

settings.h 4.9KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139
  1. /* Copyright (C) 2011 Circuits At Home, LTD. All rights reserved.
  2. This software may be distributed and modified under the terms of the GNU
  3. General Public License version 2 (GPL2) as published by the Free Software
  4. Foundation and appearing in the file GPL2.TXT included in the packaging of
  5. this file. Please note that GPL2 Section 2[b] requires that all works based
  6. on this software must also be made publicly available under the terms of
  7. the GPL2 ("Copyleft").
  8. Contact information
  9. -------------------
  10. Circuits At Home, LTD
  11. Web : http://www.circuitsathome.com
  12. e-mail : [email protected]
  13. */
  14. #ifndef USB_HOST_SHIELD_SETTINGS_H
  15. #define USB_HOST_SHIELD_SETTINGS_H
  16. #include "macros.h"
  17. ////////////////////////////////////////////////////////////////////////////////
  18. // DEBUGGING
  19. ////////////////////////////////////////////////////////////////////////////////
  20. /* Set this to 1 to activate serial debugging */
  21. #define ENABLE_UHS_DEBUGGING 0
  22. /* This can be used to select which serial port to use for debugging if
  23. * multiple serial ports are available.
  24. * For example Serial3.
  25. */
  26. #ifndef USB_HOST_SERIAL
  27. #define USB_HOST_SERIAL Serial
  28. #endif
  29. ////////////////////////////////////////////////////////////////////////////////
  30. // Manual board activation
  31. ////////////////////////////////////////////////////////////////////////////////
  32. /* Set this to 1 if you are using an Arduino Mega ADK board with MAX3421e built-in */
  33. #define USE_UHS_MEGA_ADK 0 // If you are using Arduino 1.5.5 or newer there is no need to do this manually
  34. /* Set this to 1 if you are using a Black Widdow */
  35. #define USE_UHS_BLACK_WIDDOW 0
  36. /* Set this to a one to use the xmem2 lock. This is needed for multitasking and threading */
  37. #define USE_XMEM_SPI_LOCK 0
  38. ////////////////////////////////////////////////////////////////////////////////
  39. // Wii IR camera
  40. ////////////////////////////////////////////////////////////////////////////////
  41. /* Set this to 1 to activate code for the Wii IR camera */
  42. #define ENABLE_WII_IR_CAMERA 0
  43. ////////////////////////////////////////////////////////////////////////////////
  44. // MASS STORAGE
  45. ////////////////////////////////////////////////////////////////////////////////
  46. // <<<<<<<<<<<<<<<< IMPORTANT >>>>>>>>>>>>>>>
  47. // Set this to 1 to support single LUN devices, and save RAM. -- I.E. thumb drives.
  48. // Each LUN needs ~13 bytes to be able to track the state of each unit.
  49. #ifndef MASS_MAX_SUPPORTED_LUN
  50. #define MASS_MAX_SUPPORTED_LUN 8
  51. #endif
  52. ////////////////////////////////////////////////////////////////////////////////
  53. // Set to 1 to use the faster spi4teensy3 driver.
  54. ////////////////////////////////////////////////////////////////////////////////
  55. #ifndef USE_SPI4TEENSY3
  56. #define USE_SPI4TEENSY3 1
  57. #endif
  58. ////////////////////////////////////////////////////////////////////////////////
  59. // AUTOMATIC Settings
  60. ////////////////////////////////////////////////////////////////////////////////
  61. // No user serviceable parts below this line.
  62. // DO NOT change anything below here unless you are a developer!
  63. #include "version_helper.h"
  64. #if defined(__GNUC__) && defined(__AVR__)
  65. #ifndef GCC_VERSION
  66. #define GCC_VERSION (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__)
  67. #endif
  68. #if GCC_VERSION < 40602 // Test for GCC < 4.6.2
  69. #ifdef PROGMEM
  70. #undef PROGMEM
  71. #define PROGMEM __attribute__((section(".progmem.data"))) // Workaround for http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34734#c4
  72. #ifdef PSTR
  73. #undef PSTR
  74. #define PSTR(s) (__extension__({static const char __c[] PROGMEM = (s); &__c[0];})) // Copied from pgmspace.h in avr-libc source
  75. #endif
  76. #endif
  77. #endif
  78. #endif
  79. #if !defined(DEBUG_USB_HOST) && ENABLE_UHS_DEBUGGING
  80. #define DEBUG_USB_HOST
  81. #endif
  82. #if !defined(WIICAMERA) && ENABLE_WII_IR_CAMERA
  83. #define WIICAMERA
  84. #endif
  85. // To use some other locking (e.g. freertos),
  86. // define XMEM_ACQUIRE_SPI and XMEM_RELEASE_SPI to point to your lock and unlock.
  87. // NOTE: NO argument is passed. You have to do this within your routine for
  88. // whatever you are using to lock and unlock.
  89. #if !defined(XMEM_ACQUIRE_SPI)
  90. #if USE_XMEM_SPI_LOCK || defined(USE_MULTIPLE_APP_API)
  91. #include <xmem.h>
  92. #else
  93. #define XMEM_ACQUIRE_SPI() (void(0))
  94. #define XMEM_RELEASE_SPI() (void(0))
  95. #endif
  96. #endif
  97. #if !defined(EXT_RAM) && defined(EXT_RAM_STACK) || defined(EXT_RAM_HEAP)
  98. #include <xmem.h>
  99. #else
  100. #define EXT_RAM 0
  101. #endif
  102. #if defined(CORE_TEENSY) && (defined(__MK20DX128__) || defined(__MK20DX256__))
  103. #define USING_SPI4TEENSY3 USE_SPI4TEENSY3
  104. #else
  105. #define USING_SPI4TEENSY3 0
  106. #endif
  107. #if ((defined(ARDUINO_SAM_DUE) && defined(__SAM3X8E__)) || defined(RBL_NRF51822) || defined(__ARDUINO_X86__) || ARDUINO >= 10600) && !USING_SPI4TEENSY3
  108. #include <SPI.h> // Use the Arduino SPI library for the Arduino Due, RedBearLab nRF51822, Intel Galileo 1 & 2, Intel Edison or if the SPI library with transaction is available
  109. #endif
  110. #if defined(__PIC32MX__) || defined(__PIC32MZ__)
  111. #include <../../../../hardware/pic32/libraries/SPI/SPI.h> // Hack to use the SPI library
  112. #endif
  113. #endif /* SETTINGS_H */