Browse Source

STM32F1: Don't toggle EEPROM SPI SS (#14299)

Tanguy Pruvot 6 years ago
parent
commit
391250b04f
1 changed files with 3 additions and 3 deletions
  1. 3
    3
      Marlin/src/HAL/HAL_STM32F1/HAL_spi_STM32F1.cpp

+ 3
- 3
Marlin/src/HAL/HAL_STM32F1/HAL_spi_STM32F1.cpp View File

@@ -157,14 +157,14 @@ void spiSendBlock(uint8_t token, const uint8_t* buf) {
157 157
 #if ENABLED(SPI_EEPROM)
158 158
 
159 159
 // Read single byte from specified SPI channel
160
-uint8_t spiRec(uint32_t chan) { return spiRec(); }
160
+uint8_t spiRec(uint32_t chan) { return SPI.transfer(ff); }
161 161
 
162 162
 // Write single byte to specified SPI channel
163
-void spiSend(uint32_t chan, byte b) { spiSend(b); }
163
+void spiSend(uint32_t chan, byte b) { SPI.send(b); }
164 164
 
165 165
 // Write buffer to specified SPI channel
166 166
 void spiSend(uint32_t chan, const uint8_t* buf, size_t n) {
167
-  for (size_t p = 0; p < n; p++) spiSend(buf[p]);
167
+  for (size_t p = 0; p < n; p++) spiSend(chan, buf[p]);
168 168
 }
169 169
 
170 170
 #endif // SPI_EEPROM

Loading…
Cancel
Save