Skip to content

Commit

Permalink
🩹 Fix Maple HAL compile errors (MarlinFirmware#23685)
Browse files Browse the repository at this point in the history
  • Loading branch information
InsanityAutomation authored and tomek2k1 committed Jan 13, 2023
1 parent c93e045 commit b5a06c6
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions Marlin/src/HAL/STM32F1/onboard_sd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,13 @@
#define SPI_CLOCK_MAX SPI_BAUD_PCLK_DIV_2
#endif

#define CS_LOW() WRITE(ONBOARD_SD_CS_PIN, LOW) // Set OnboardSPI cs low
#define CS_HIGH() WRITE(ONBOARD_SD_CS_PIN, HIGH) // Set OnboardSPI cs high
#if PIN_EXISTS(ONBOARD_SD_CS) && ONBOARD_SD_CS_PIN != SD_SS_PIN
#define CS_LOW() WRITE(ONBOARD_SD_CS_PIN, LOW) // Set OnboardSPI cs low
#define CS_HIGH() WRITE(ONBOARD_SD_CS_PIN, HIGH) // Set OnboardSPI cs high
#else
#define CS_LOW()
#define CS_HIGH()
#endif

#define FCLK_FAST() ONBOARD_SD_SPI.setClockDivider(SPI_CLOCK_MAX)
#define FCLK_SLOW() ONBOARD_SD_SPI.setClockDivider(SPI_BAUD_PCLK_DIV_256)
Expand Down

0 comments on commit b5a06c6

Please sign in to comment.