浏览代码

Patch _IS_HW_SPI so defined() works

Scott Lahteine 6 年前
父节点
当前提交
9ff4e9e1e6
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2
    2
      Marlin/src/HAL/HAL_DUE/SanityCheck_Due.h

+ 2
- 2
Marlin/src/HAL/HAL_DUE/SanityCheck_Due.h 查看文件

@@ -39,11 +39,11 @@
39 39
  * Usually the hardware SPI pins are only available to the LCD. This makes the DUE hard SPI used at the same time
40 40
  * as the TMC2130 soft SPI the most common setup.
41 41
  */
42
-#define _IS_HW_SPI(P) (defined(P) && (P == MOSI_PIN || P == MISO_PIN || P == SCK_PIN))
42
+#define _IS_HW_SPI(P) (defined(TMC_SW_##P) && (TMC_SW_##P == MOSI_PIN || TMC_SW_##P == MISO_PIN || TMC_SW_##P == SCK_PIN))
43 43
 
44 44
 #if ENABLED(SDSUPPORT) && ENABLED(HAVE_TMC2130)
45 45
   #if ENABLED(TMC_USE_SW_SPI)
46
-    #if DISABLED(DUE_SOFTWARE_SPI) && (_IS_HW_SPI(TMC_SW_MOSI) || _IS_HW_SPI(TMC_SW_MISO) || _IS_HW_SPI(TMC_SW_SCK))
46
+    #if DISABLED(DUE_SOFTWARE_SPI) && (_IS_HW_SPI(MOSI) || _IS_HW_SPI(MISO) || _IS_HW_SPI(SCK))
47 47
       #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."
48 48
     #endif
49 49
   #elif ENABLED(DUE_SOFTWARE_SPI)

正在加载...
取消
保存