🩹 Use custom I2C pins for OLED (#24970)
This commit is contained in:
committed by
Scott Lahteine
parent
ac05f0cb8b
commit
8bafc1d9ae
@ -173,6 +173,10 @@ constexpr uint8_t epps = ENCODER_PULSES_PER_STEP;
|
||||
|
||||
#endif
|
||||
|
||||
#if HAS_U8GLIB_I2C_OLED && PINS_EXIST(I2C_SCL, I2C_SDA) && DISABLED(SOFT_I2C_EEPROM)
|
||||
#include "Wire.h"
|
||||
#endif
|
||||
|
||||
// Encoder Handling
|
||||
#if HAS_ENCODER_ACTION
|
||||
uint32_t MarlinUI::encoderPosition;
|
||||
@ -265,6 +269,10 @@ 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);
|
||||
|
Reference in New Issue
Block a user