Преглед на файлове

🩹 Fix Maple HAL compile errors (#23685)

InsanityAutomation преди 2 години
родител
ревизия
3e93def08e
No account linked to committer's email address
променени са 1 файла, в които са добавени 7 реда и са изтрити 2 реда
  1. 7
    2
      Marlin/src/HAL/STM32F1/onboard_sd.cpp

+ 7
- 2
Marlin/src/HAL/STM32F1/onboard_sd.cpp Целия файл

@@ -38,8 +38,13 @@
38 38
   #define SPI_CLOCK_MAX SPI_BAUD_PCLK_DIV_2
39 39
 #endif
40 40
 
41
-#define CS_LOW()  WRITE(ONBOARD_SD_CS_PIN, LOW)  // Set OnboardSPI cs low
42
-#define CS_HIGH() WRITE(ONBOARD_SD_CS_PIN, HIGH) // Set OnboardSPI cs high
41
+#if PIN_EXISTS(ONBOARD_SD_CS) && ONBOARD_SD_CS_PIN != SD_SS_PIN
42
+  #define CS_LOW()  WRITE(ONBOARD_SD_CS_PIN, LOW)  // Set OnboardSPI cs low
43
+  #define CS_HIGH() WRITE(ONBOARD_SD_CS_PIN, HIGH) // Set OnboardSPI cs high
44
+#else
45
+  #define CS_LOW()
46
+  #define CS_HIGH()
47
+#endif
43 48
 
44 49
 #define FCLK_FAST() ONBOARD_SD_SPI.setClockDivider(SPI_CLOCK_MAX)
45 50
 #define FCLK_SLOW() ONBOARD_SD_SPI.setClockDivider(SPI_BAUD_PCLK_DIV_256)

Loading…
Отказ
Запис