🐛 Put I2C init ahead of LCD init (#26409)

This commit is contained in:
ellensp 2023-11-14 21:33:15 +13:00 committed by GitHub
parent a8cb89b3da
commit 28bc19720a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -218,6 +218,10 @@ constexpr uint8_t epps = ENCODER_PULSES_PER_STEP;
void MarlinUI::init() {
#if HAS_U8GLIB_I2C_OLED && PINS_EXIST(I2C_SCL, I2C_SDA) && DISABLED(SOFT_I2C_EEPROM)
Wire.begin(uint8_t(I2C_SDA_PIN), uint8_t(I2C_SCL_PIN));
#endif
init_lcd();
#if HAS_DIGITAL_BUTTONS
@ -274,10 +278,6 @@ void MarlinUI::init() {
slow_buttons = 0;
#endif
#if HAS_U8GLIB_I2C_OLED && PINS_EXIST(I2C_SCL, I2C_SDA) && DISABLED(SOFT_I2C_EEPROM)
Wire.begin(int(I2C_SDA_PIN), int(I2C_SCL_PIN));
#endif
update_buttons();
TERN_(HAS_ENCODER_ACTION, encoderDiff = 0);