Skip to content

Commit

Permalink
🐛 Put I2C init ahead of LCD init (#26409)
Browse files Browse the repository at this point in the history
  • Loading branch information
ellensp committed Nov 14, 2023
1 parent a8cb89b commit 28bc197
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Marlin/src/lcd/marlinui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 28bc197

Please sign in to comment.