STM32F1: Init EEPROM SPI pin modes (#14810)

This commit is contained in:
Tanguy Pruvot 2019-08-04 01:11:06 +02:00 committed by Scott Lahteine
parent 52a7a8cb26
commit 4bd1e55093

View file

@ -26,7 +26,18 @@
#include "../shared/persistent_store_api.h" #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::access_finish() { return true; }
bool PersistentStore::write_data(int &pos, const uint8_t *value, size_t size, uint16_t *crc) { bool PersistentStore::write_data(int &pos, const uint8_t *value, size_t size, uint16_t *crc) {