STM32F1: Init EEPROM SPI pin modes (#14810)
This commit is contained in:
parent
52a7a8cb26
commit
4bd1e55093
1 changed files with 12 additions and 1 deletions
|
@ -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) {
|
||||||
|
|
Reference in a new issue