Browse Source

Allow use of either SD Card slot when LCD Panel is configured.

Preference is for Controller SD slot before LCD Panel slot when both are occupied.
pull/1/head
Neil Darlow 11 years ago
parent
commit
89f78b0b80
  1. 12
      Marlin/cardreader.cpp
  2. 6
      Marlin/pins.h

12
Marlin/cardreader.cpp

@ -150,9 +150,17 @@ void CardReader::initsd()
if(root.isOpen())
root.close();
#ifdef SDSLOW
if (!card.init(SPI_HALF_SPEED,SDSS))
if (!card.init(SPI_HALF_SPEED,SDSS)
#if defined(LCD_SDSS) && (LCD_SDSS != SDSS)
&& !card.init(SPI_HALF_SPEED,LCD_SDSS)
#endif
)
#else
if (!card.init(SPI_FULL_SPEED,SDSS))
if (!card.init(SPI_FULL_SPEED,SDSS)
#if defined(LCD_SDSS) && (LCD_SDSS != SDSS)
&& !card.init(SPI_FULL_SPEED,LCD_SDSS)
#endif
)
#endif
{
//if (!card.init(SPI_HALF_SPEED,SDSS))

6
Marlin/pins.h

@ -614,14 +614,14 @@
#define BTN_EN1 47 //reverse if the encoder turns the wrong way.
#define BTN_EN2 43
#define BTN_ENC 32
#define SDSS 53
#define LCD_SDSS 53
#define SDCARDDETECT -1
#define KILL_PIN 41
#elif defined(LCD_I2C_VIKI)
#define BTN_EN1 22 //reverse if the encoder turns the wrong way.
#define BTN_EN2 7
#define BTN_ENC -1
#define SDSS 53
#define LCD_SDSS 53
#define SDCARDDETECT 49
#else
//arduino pin which triggers an piezzo beeper
@ -1123,7 +1123,7 @@
#ifdef LCD_I2C_PANELOLU2
#ifdef MELZI
#define BTN_ENC 29 //the click switch
#define SDSS 30 //to use the SD card reader on the Panelolu2 rather than the melzi board
#define LCD_SDSS 30 //to use the SD card reader on the Panelolu2 rather than the melzi board
#else
#define BTN_ENC 30 //the click switch
#endif

Loading…
Cancel
Save