I2C EEPROM support #3860

This commit is contained in:
rusefillc 2022-02-06 19:48:20 -05:00
parent ad57fd1628
commit 8892cd26ff
1 changed files with 4 additions and 1 deletions

View File

@ -479,12 +479,13 @@ __attribute__((weak)) void boardInitHardware() { }
__attribute__((weak)) void setPinConfigurationOverrides() { }
#if HAL_USE_I2C
const I2CConfig i2cfg = {
OPMODE_I2C,
400000,
FAST_DUTY_CYCLE_2,
};
#endif
void initHardware() {
#if EFI_HD44780_LCD
@ -500,9 +501,11 @@ void initHardware() {
return;
}
#if HAL_USE_I2C
if (engineConfiguration->useEeprom) {
i2cStart(&I2CD3, &i2cfg);
}
#endif // HAL_USE_I2C
boardInitHardware();