Browse Source

STM32F1: Init EEPROM SPI pin modes (#14810)

pull/1/head
Tanguy Pruvot 5 years ago
committed by Scott Lahteine
parent
commit
4bd1e55093
  1. 13
      Marlin/src/HAL/HAL_STM32F1/persistent_store_eeprom.cpp

13
Marlin/src/HAL/HAL_STM32F1/persistent_store_eeprom.cpp

@ -26,7 +26,18 @@
#include "../shared/persistent_store_api.h"
bool PersistentStore::access_start() { return true; }
bool PersistentStore::access_start() {
#if ENABLED(SPI_EEPROM)
#if SPI_CHAN_EEPROM1 == 1
SET_OUTPUT(BOARD_SPI1_SCK_PIN);
SET_OUTPUT(BOARD_SPI1_MOSI_PIN);
SET_INPUT(BOARD_SPI1_MISO_PIN);
SET_OUTPUT(SPI_EEPROM1_CS);
#endif
spiInit(0);
#endif
return true;
}
bool PersistentStore::access_finish() { return true; }
bool PersistentStore::write_data(int &pos, const uint8_t *value, size_t size, uint16_t *crc) {

Loading…
Cancel
Save