Browse Source

Unused SPI PIN definitions

pull/1/head
GMagician 5 years ago
committed by Scott Lahteine
parent
commit
8be146642f
  1. 17
      Marlin/src/sd/Sd2Card.h
  2. 6
      Marlin/src/sd/SdFatConfig.h
  3. 7
      Marlin/src/sd/usb_flashdrive/Sd2Card_FlashDrive.h

17
Marlin/src/sd/Sd2Card.h

@ -90,23 +90,6 @@ uint8_t const SD_CARD_TYPE_SD1 = 1, // Standard capacity V1
//
#define SD_CHIP_SELECT_PIN SS_PIN
#if 0
#if DISABLED(SOFTWARE_SPI)
// hardware pin defs
#define SD_CHIP_SELECT_PIN SS_PIN // The default chip select pin for the SD card is SS.
// The following three pins must not be redefined for hardware SPI.
#define SPI_MOSI_PIN MOSI_PIN // SPI Master Out Slave In pin
#define SPI_MISO_PIN MISO_PIN // SPI Master In Slave Out pin
#define SPI_SCK_PIN SCK_PIN // SPI Clock pin
#else // SOFTWARE_SPI
#define SD_CHIP_SELECT_PIN SOFT_SPI_CS_PIN // SPI chip select pin
#define SPI_MOSI_PIN SOFT_SPI_MOSI_PIN // SPI Master Out Slave In pin
#define SPI_MISO_PIN SOFT_SPI_MISO_PIN // SPI Master In Slave Out pin
#define SPI_SCK_PIN SOFT_SPI_SCK_PIN // SPI Clock pin
#endif // SOFTWARE_SPI
#endif
/**
* \class Sd2Card
* \brief Raw access to SD and SDHC flash memory cards.

6
Marlin/src/sd/SdFatConfig.h

@ -90,12 +90,6 @@
// Set USE_SOFTWARE_SPI nonzero to ALWAYS use Software SPI.
#define USE_SOFTWARE_SPI 0
// Define software SPI pins so Mega can use unmodified 168/328 shields
#define SOFT_SPI_CS_PIN 10 // Software SPI chip select pin for the SD
#define SOFT_SPI_MOSI_PIN 11 // Software SPI Master Out Slave In pin
#define SOFT_SPI_MISO_PIN 12 // Software SPI Master In Slave Out pin
#define SOFT_SPI_SCK_PIN 13 // Software SPI Clock pin
/**
* The __cxa_pure_virtual function is an error handler that is invoked when
* a pure virtual function is called.

7
Marlin/src/sd/usb_flashdrive/Sd2Card_FlashDrive.h

@ -46,15 +46,8 @@
#if DISABLED(SOFTWARE_SPI)
// hardware pin defs
#define SD_CHIP_SELECT_PIN SS_PIN // The default chip select pin for the SD card is SS.
// The following three pins must not be redefined for hardware SPI.
#define SPI_MOSI_PIN MOSI_PIN // SPI Master Out Slave In pin
#define SPI_MISO_PIN MISO_PIN // SPI Master In Slave Out pin
#define SPI_SCK_PIN SCK_PIN // SPI Clock pin
#else // SOFTWARE_SPI
#define SD_CHIP_SELECT_PIN SOFT_SPI_CS_PIN // SPI chip select pin
#define SPI_MOSI_PIN SOFT_SPI_MOSI_PIN // SPI Master Out Slave In pin
#define SPI_MISO_PIN SOFT_SPI_MISO_PIN // SPI Master In Slave Out pin
#define SPI_SCK_PIN SOFT_SPI_SCK_PIN // SPI Clock pin
#endif // SOFTWARE_SPI
class Sd2Card {

Loading…
Cancel
Save