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.

SanityCheck.h 2.4KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. /**
  2. * Marlin 3D Printer Firmware
  3. * Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
  4. *
  5. * Based on Sprinter and grbl.
  6. * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
  7. *
  8. * This program is free software: you can redistribute it and/or modify
  9. * it under the terms of the GNU General Public License as published by
  10. * the Free Software Foundation, either version 3 of the License, or
  11. * (at your option) any later version.
  12. *
  13. * This program is distributed in the hope that it will be useful,
  14. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  16. * GNU General Public License for more details.
  17. *
  18. * You should have received a copy of the GNU General Public License
  19. * along with this program. If not, see <https://www.gnu.org/licenses/>.
  20. *
  21. */
  22. #pragma once
  23. /**
  24. * Test Arduino Due specific configuration values for errors at compile-time.
  25. */
  26. /**
  27. * HARDWARE VS. SOFTWARE SPI COMPATIBILITY
  28. *
  29. * DUE selects hardware vs. software SPI depending on whether one of the hardware-controllable SDSS pins is in use.
  30. *
  31. * The hardware SPI controller doesn't allow software SPIs to control any shared pins.
  32. *
  33. * When DUE software SPI is used then Trinamic drivers must use the TMC softSPI.
  34. *
  35. * When DUE hardware SPI is used then a Trinamic driver can use either its hardware SPI or, if there are no shared
  36. * pins, its software SPI.
  37. *
  38. * Usually the hardware SPI pins are only available to the LCD. This makes the DUE hard SPI used at the same time
  39. * as the TMC2130 soft SPI the most common setup.
  40. */
  41. #define _IS_HW_SPI(P) (defined(TMC_SW_##P) && (TMC_SW_##P == MOSI_PIN || TMC_SW_##P == MISO_PIN || TMC_SW_##P == SCK_PIN))
  42. #if ENABLED(SDSUPPORT) && HAS_DRIVER(TMC2130)
  43. #if ENABLED(TMC_USE_SW_SPI)
  44. #if DISABLED(DUE_SOFTWARE_SPI) && (_IS_HW_SPI(MOSI) || _IS_HW_SPI(MISO) || _IS_HW_SPI(SCK))
  45. #error "DUE hardware SPI is required but is incompatible with TMC2130 software SPI. Either disable TMC_USE_SW_SPI or use separate pins for the two SPIs."
  46. #endif
  47. #elif ENABLED(DUE_SOFTWARE_SPI)
  48. #error "DUE software SPI is required but is incompatible with TMC2130 hardware SPI. Enable TMC_USE_SW_SPI to fix."
  49. #endif
  50. #endif
  51. #if ENABLED(FAST_PWM_FAN)
  52. #error "FAST_PWM_FAN is not yet implemented for this platform."
  53. #endif
  54. #if HAS_TMC_SW_SERIAL
  55. #error "TMC220x Software Serial is not supported on this platform."
  56. #endif