🐛 Put I2C init ahead of LCD init (#26409)
This commit is contained in:
parent
a8cb89b3da
commit
28bc19720a
|
@ -218,6 +218,10 @@ constexpr uint8_t epps = ENCODER_PULSES_PER_STEP;
|
||||||
|
|
||||||
void MarlinUI::init() {
|
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();
|
init_lcd();
|
||||||
|
|
||||||
#if HAS_DIGITAL_BUTTONS
|
#if HAS_DIGITAL_BUTTONS
|
||||||
|
@ -274,10 +278,6 @@ void MarlinUI::init() {
|
||||||
slow_buttons = 0;
|
slow_buttons = 0;
|
||||||
#endif
|
#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();
|
update_buttons();
|
||||||
|
|
||||||
TERN_(HAS_ENCODER_ACTION, encoderDiff = 0);
|
TERN_(HAS_ENCODER_ACTION, encoderDiff = 0);
|
||||||
|
|
Loading…
Reference in a new issue