STM32F1: Init EEPROM SPI pin modes (#14810)

2.0.x
Tanguy Pruvot 5 years ago committed by Scott Lahteine
parent 52a7a8cb26
commit 4bd1e55093

@ -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