My Marlin configs for Fabrikator Mini and CTC i3 Pro B
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.

UHS_settings.h 5.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141
  1. /* Copyright (C) 2015-2016 Andrew J. Kroll
  2. and
  3. Copyright (C) 2011 Circuits At Home, LTD. All rights reserved.
  4. This program is free software; you can redistribute it and/or modify
  5. it under the terms of the GNU General Public License as published by
  6. the Free Software Foundation; either version 2 of the License, or
  7. (at your option) any later version.
  8. This program is distributed in the hope that it will be useful,
  9. but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  11. GNU General Public License for more details.
  12. You should have received a copy of the GNU General Public License
  13. along with this program; if not, write to the Free Software
  14. Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  15. Contact information
  16. -------------------
  17. Circuits At Home, LTD
  18. Web : https://www.circuitsathome.com
  19. e-mail : support@circuitsathome.com
  20. */
  21. #ifndef UHS_SETTINGS_H
  22. #define UHS_SETTINGS_H
  23. // TO-DO: Move specific settings to modules which use them.
  24. ////////////////////////////////////////////////////////////////////////////////
  25. // Define any of these options at the top of your sketch to override
  26. // the defaults contained herewith. Do NOT do modifications here.
  27. // Individual Components have their own settings.
  28. //
  29. // Macro | Settings and notes | Default
  30. // -----------------------------+-----------------------+-----------------------
  31. // | Any class that does |
  32. // USB_HOST_SERIAL | text streaming | SERIAL_PORT_MONITOR
  33. // | e.g. Serial2 |
  34. // -----------------------------+-----------------------+-----------------------
  35. // ENABLE_UHS_DEBUGGING | 0 = off, 1 = on | 0
  36. // -----------------------------+-----------------------+-----------------------
  37. // | 0 = off, 1 = on |
  38. // | Caution! Can make |
  39. // DEBUG_PRINTF_EXTRA_HUGE | program too large! | 0
  40. // | Other modules depend |
  41. // | on this setting. |
  42. // -----------------------------+-----------------------+-----------------------
  43. // USE_UHS_BLACK_WIDDOW | 0 = no, 1 = yes | 0
  44. // -----------------------------+-----------------------+-----------------------
  45. // ENABLE_WII_IR_CAMERA | 0 = no, 1 = yes | 0
  46. // -----------------------------^-----------------------^-----------------------
  47. //
  48. ////////////////////////////////////////////////////////////////////////////////
  49. ////////////////////////////////////////////////////////////////////////////////
  50. // DEBUGGING
  51. ////////////////////////////////////////////////////////////////////////////////
  52. #ifndef USB_HOST_SERIAL
  53. #if defined(SERIAL_PORT_USBVIRTUAL) && defined(LOAD_UHS_KINETIS_FS_HOST)
  54. #define USB_HOST_SERIAL SERIAL_PORT_HARDWARE
  55. #else
  56. #define USB_HOST_SERIAL SERIAL_PORT_MONITOR
  57. #endif
  58. #endif
  59. #ifndef ENABLE_UHS_DEBUGGING
  60. #define ENABLE_UHS_DEBUGGING 0
  61. #endif
  62. #ifndef DEBUG_PRINTF_EXTRA_HUGE
  63. #define DEBUG_PRINTF_EXTRA_HUGE 0
  64. #endif
  65. ////////////////////////////////////////////////////////////////////////////////
  66. // Manual board activation
  67. ////////////////////////////////////////////////////////////////////////////////
  68. /* Set this to 1 if you are using a Black Widdow */
  69. #ifndef USE_UHS_BLACK_WIDDOW
  70. #define USE_UHS_BLACK_WIDDOW 0
  71. #endif
  72. ////////////////////////////////////////////////////////////////////////////////
  73. // Wii IR camera
  74. ////////////////////////////////////////////////////////////////////////////////
  75. /* Set this to 1 to activate code for the Wii IR camera */
  76. #ifndef ENABLE_WII_IR_CAMERA
  77. #define ENABLE_WII_IR_CAMERA 0
  78. #endif
  79. ////////////////////////////////////////////////////////////////////////////////
  80. // Set to 1 to use the faster spi4teensy3 driver. (not used yet))
  81. ////////////////////////////////////////////////////////////////////////////////
  82. #ifndef USE_SPI4TEENSY3
  83. #define USE_SPI4TEENSY3 0
  84. #endif
  85. ////////////////////////////////////////////////////////////////////////////////
  86. // AUTOMATIC Settings
  87. ////////////////////////////////////////////////////////////////////////////////
  88. // No user serviceable parts below this line.
  89. // DO NOT change anything below here unless you are a developer!
  90. #if defined(__GNUC__) && defined(__AVR__)
  91. #ifndef GCC_VERSION
  92. #define GCC_VERSION (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__)
  93. #endif
  94. #if GCC_VERSION < 40602 // Test for GCC < 4.6.2
  95. #ifdef PROGMEM
  96. #undef PROGMEM
  97. #define PROGMEM __attribute__((section(".progmem.data"))) // Workaround for https://gcc.gnu.org/bugzilla/show_bug.cgi?id=34734#c4
  98. #ifdef PSTR
  99. #undef PSTR
  100. #define PSTR(s) (__extension__({static const char __c[] PROGMEM = (s); &__c[0];})) // Copied from pgmspace.h in avr-libc source
  101. #endif
  102. #endif
  103. #endif
  104. #endif
  105. #if !defined(DEBUG_USB_HOST) && ENABLE_UHS_DEBUGGING
  106. #define DEBUG_USB_HOST
  107. #endif
  108. #if !defined(WIICAMERA) && ENABLE_WII_IR_CAMERA
  109. #define WIICAMERA
  110. #endif
  111. #define UHS_SLEEP_MS(v) pUsb->sof_delay(v)
  112. #ifndef UHS_NI
  113. #define UHS_NI __attribute__((noinline))
  114. #endif
  115. #endif /* SETTINGS_H */