Giuliano Zaro пре 6 година
родитељ
комит
caa87d5fe1
2 измењених фајлова са 2 додато и 6 уклоњено
  1. 1
    1
      Marlin/src/sd/Sd2Card.cpp
  2. 1
    5
      Marlin/src/sd/Sd2Card.h

+ 1
- 1
Marlin/src/sd/Sd2Card.cpp Прегледај датотеку

227
  * \return true for success, false for failure.
227
  * \return true for success, false for failure.
228
  * The reason for failure can be determined by calling errorCode() and errorData().
228
  * The reason for failure can be determined by calling errorCode() and errorData().
229
  */
229
  */
230
-bool Sd2Card::init(const uint8_t sckRateID/*=0*/, const pin_t chipSelectPin/*=SD_CHIP_SELECT_PIN*/) {
230
+bool Sd2Card::init(const uint8_t sckRateID, const pin_t chipSelectPin) {
231
   errorCode_ = type_ = 0;
231
   errorCode_ = type_ = 0;
232
   chipSelectPin_ = chipSelectPin;
232
   chipSelectPin_ = chipSelectPin;
233
   // 16-bit init start time allows over a minute
233
   // 16-bit init start time allows over a minute

+ 1
- 5
Marlin/src/sd/Sd2Card.h Прегледај датотеку

85
 #elif USE_SOFTWARE_SPI
85
 #elif USE_SOFTWARE_SPI
86
   #define SOFTWARE_SPI
86
   #define SOFTWARE_SPI
87
 #endif  // MEGA_SOFT_SPI
87
 #endif  // MEGA_SOFT_SPI
88
-//------------------------------------------------------------------------------
89
-// SPI pin definitions - do not edit here - change in SdFatConfig.h
90
-//
91
-#define SD_CHIP_SELECT_PIN SS_PIN
92
 
88
 
93
 /**
89
 /**
94
  * \class Sd2Card
90
  * \class Sd2Card
123
    *
119
    *
124
    * \return true for success or false for failure.
120
    * \return true for success or false for failure.
125
    */
121
    */
126
-  bool init(const uint8_t sckRateID=SPI_FULL_SPEED, const pin_t chipSelectPin=SD_CHIP_SELECT_PIN);
122
+  bool init(const uint8_t sckRateID, const pin_t chipSelectPin);
127
 
123
 
128
   bool readBlock(uint32_t block, uint8_t* dst);
124
   bool readBlock(uint32_t block, uint8_t* dst);
129
 
125
 

Loading…
Откажи
Сачувај