I2C EEPROM support #3860

This commit is contained in:
rusefi 2022-02-06 17:23:07 -05:00
parent cecfc2dd71
commit cdbd94a15b
2 changed files with 16 additions and 1 deletions

View File

@ -6,6 +6,7 @@ DDEFS += -DSTM32F407xx
# We are running on Frankenso hardware!
DDEFS += -DHW_FRANKENSO=1
DDEFS += -DSTM32_I2C_USE_I2C3=TRUE
ifndef IS_RE_BOOTLOADER
DDEFS += -DHAL_USE_EEPROM=TRUE

View File

@ -137,11 +137,25 @@
/*
* I2C driver system settings.
*/
#ifndef STM32_I2C_USE_I2C1
#define STM32_I2C_USE_I2C1 FALSE
/* PB10/PB11 like some Hellen likes */
#endif
#ifndef STM32_I2C_USE_I2C2
/* PB10/PB11 like some Hellen likes AF4 */
#define STM32_I2C_USE_I2C2 TRUE
#endif
#ifndef STM32_I2C_USE_I2C3
// PC9 I2C3_SDA AF4
// PA8 I2C3_SCL AF4
#define STM32_I2C_USE_I2C3 FALSE
#endif
#ifndef STM32_I2C_USE_I2C4
#define STM32_I2C_USE_I2C4 FALSE
#endif
#define STM32_I2C_BUSY_TIMEOUT 50
#define STM32_I2C_I2C1_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 0)
#define STM32_I2C_I2C1_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 6)