Skip to content

Commit

Permalink
🎨 LPC_SOFTWARE_SPI => SOFTWARE_SPI
Browse files Browse the repository at this point in the history
Co-Authored-By: Martin Turski <[email protected]>
  • Loading branch information
thinkyhead and quiret committed May 17, 2023
1 parent ebe3fe0 commit 376e940
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 12 deletions.
8 changes: 4 additions & 4 deletions Marlin/src/HAL/LINUX/spi_pins.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@
#include "../../inc/MarlinConfigPre.h"

#if BOTH(HAS_MARLINUI_U8GLIB, SDSUPPORT) && (LCD_PINS_D4 == SD_SCK_PIN || LCD_PINS_ENABLE == SD_MOSI_PIN || DOGLCD_SCK == SD_SCK_PIN || DOGLCD_MOSI == SD_MOSI_PIN)
#define LPC_SOFTWARE_SPI // If the SD card and LCD adapter share the same SPI pins, then software SPI is currently
// needed due to the speed and mode required for communicating with each device being different.
// This requirement can be removed if the SPI access to these devices is updated to use
// spiBeginTransaction.
#define SOFTWARE_SPI // If the SD card and LCD adapter share the same SPI pins, then software SPI is currently
// needed due to the speed and mode required for communicating with each device being different.
// This requirement can be removed if the SPI access to these devices is updated to use
// spiBeginTransaction.
#endif

// Onboard SD
Expand Down
4 changes: 2 additions & 2 deletions Marlin/src/HAL/LPC1768/HAL_SPI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
// ------------------------
// Public functions
// ------------------------
#if ENABLED(LPC_SOFTWARE_SPI)
#if ENABLED(SOFTWARE_SPI)

// Software SPI

Expand Down Expand Up @@ -161,7 +161,7 @@
// TODO: Implement this method
}

#endif // LPC_SOFTWARE_SPI
#endif // SOFTWARE_SPI

/**
* @brief Wait until TXE (tx empty) flag is set and BSY (busy) flag unset.
Expand Down
8 changes: 4 additions & 4 deletions Marlin/src/HAL/LPC1768/spi_pins.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@
#include "../../core/macros.h"

#if BOTH(SDSUPPORT, HAS_MARLINUI_U8GLIB) && (LCD_PINS_D4 == SD_SCK_PIN || LCD_PINS_ENABLE == SD_MOSI_PIN || DOGLCD_SCK == SD_SCK_PIN || DOGLCD_MOSI == SD_MOSI_PIN)
#define LPC_SOFTWARE_SPI // If the SD card and LCD adapter share the same SPI pins, then software SPI is currently
// needed due to the speed and mode required for communicating with each device being different.
// This requirement can be removed if the SPI access to these devices is updated to use
// spiBeginTransaction.
#define SOFTWARE_SPI // If the SD card and LCD adapter share the same SPI pins, then software SPI is currently
// needed due to the speed and mode required for communicating with each device being different.
// This requirement can be removed if the SPI access to these devices is updated to use
// spiBeginTransaction.
#endif

/** onboard SD card */
Expand Down
2 changes: 1 addition & 1 deletion Marlin/src/HAL/NATIVE_SIM/spi_pins.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
#include "../../inc/MarlinConfigPre.h"

#if BOTH(HAS_MARLINUI_U8GLIB, SDSUPPORT) && (LCD_PINS_D4 == SD_SCK_PIN || LCD_PINS_ENABLE == SD_MOSI_PIN || DOGLCD_SCK == SD_SCK_PIN || DOGLCD_MOSI == SD_MOSI_PIN)
#define LPC_SOFTWARE_SPI // If the SD card and LCD adapter share the same SPI pins, then software SPI is currently
#define SOFTWARE_SPI // If the SD card and LCD adapter share the same SPI pins, then software SPI is currently
// needed due to the speed and mode required for communicating with each device being different.
// This requirement can be removed if the SPI access to these devices is updated to use
// spiBeginTransaction.
Expand Down
2 changes: 1 addition & 1 deletion Marlin/src/pins/lpc1768/pins_MKS_SBASE.h
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@
#define SD_MISO_PIN P1_23 // J8-3 (moved from EXP2 P0.8)
#define SD_MOSI_PIN P2_12 // J8-4 (moved from EXP2 P0.9)
#define SD_SS_PIN P0_28
#define LPC_SOFTWARE_SPI // With a custom cable we need software SPI because the
#define SOFTWARE_SPI // With a custom cable we need software SPI because the
// selected pins are not on a hardware SPI controller
#elif SD_CONNECTION_IS(LCD) || SD_CONNECTION_IS(ONBOARD)
#define SD_SCK_PIN P0_07
Expand Down

0 comments on commit 376e940

Please sign in to comment.