Ver código fonte

🩹 Fix Maple HAL compile errors (#23685)

InsanityAutomation 2 anos atrás
pai
commit
3e93def08e
Nenhuma conta vinculada ao e-mail do autor do commit
1 arquivos alterados com 7 adições e 2 exclusões
  1. 7
    2
      Marlin/src/HAL/STM32F1/onboard_sd.cpp

+ 7
- 2
Marlin/src/HAL/STM32F1/onboard_sd.cpp Ver arquivo

@@ -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)

Carregando…
Cancelar
Salvar