Prefix SD SPI pins (SCK, MISO, MOSI, SS) (#20606)
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
This commit is contained in:
		@@ -24,31 +24,32 @@
 | 
			
		||||
#include "../../core/macros.h"
 | 
			
		||||
#include "../../inc/MarlinConfigPre.h"
 | 
			
		||||
 | 
			
		||||
#if BOTH(HAS_MARLINUI_U8GLIB, SDSUPPORT) && (LCD_PINS_D4 == SCK_PIN || LCD_PINS_ENABLE == MOSI_PIN || DOGLCD_SCK == SCK_PIN || DOGLCD_MOSI == MOSI_PIN)
 | 
			
		||||
#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.
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
/** onboard SD card */
 | 
			
		||||
//#define SCK_PIN           P0_07
 | 
			
		||||
//#define MISO_PIN          P0_08
 | 
			
		||||
//#define MOSI_PIN          P0_09
 | 
			
		||||
//#define SS_PIN            P0_06
 | 
			
		||||
/** external */
 | 
			
		||||
#ifndef SCK_PIN
 | 
			
		||||
  #define SCK_PIN           50
 | 
			
		||||
// Onboard SD
 | 
			
		||||
//#define SD_SCK_PIN     P0_07
 | 
			
		||||
//#define SD_MISO_PIN    P0_08
 | 
			
		||||
//#define SD_MOSI_PIN    P0_09
 | 
			
		||||
//#define SD_SS_PIN      P0_06
 | 
			
		||||
 | 
			
		||||
// External SD
 | 
			
		||||
#ifndef SD_SCK_PIN
 | 
			
		||||
  #define SD_SCK_PIN        50
 | 
			
		||||
#endif
 | 
			
		||||
#ifndef MISO_PIN
 | 
			
		||||
  #define MISO_PIN          51
 | 
			
		||||
#ifndef SD_MISO_PIN
 | 
			
		||||
  #define SD_MISO_PIN       51
 | 
			
		||||
#endif
 | 
			
		||||
#ifndef MOSI_PIN
 | 
			
		||||
  #define MOSI_PIN          52
 | 
			
		||||
#ifndef SD_MOSI_PIN
 | 
			
		||||
  #define SD_MOSI_PIN       52
 | 
			
		||||
#endif
 | 
			
		||||
#ifndef SS_PIN
 | 
			
		||||
  #define SS_PIN            53
 | 
			
		||||
#ifndef SD_SS_PIN
 | 
			
		||||
  #define SD_SS_PIN         53
 | 
			
		||||
#endif
 | 
			
		||||
#ifndef SDSS
 | 
			
		||||
  #define SDSS              SS_PIN
 | 
			
		||||
  #define SDSS       SD_SS_PIN
 | 
			
		||||
#endif
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user