Improve co-existence of usermods sharing I2C
Improve co-existence of several popular usermods with respect to shared I2C bus. - ensure that i2c_sda and i2c_scl are used when defined - ensure that HW_PIN_SDA / HW_PIN_SCL are not overwritten - ensure that Wire.begin()nis always called with user-defined pins (remove rogue Wire.begin() without parameters) - ensure that set.cpp / cfg.cpp use esp32-specific global Wire objects.
This commit is contained in:
@@ -1,5 +1,10 @@
|
||||
#pragma once
|
||||
|
||||
#include <Arduino.h> // WLEDMM: make sure that I2C drivers have the "right" Wire Object
|
||||
#include <Wire.h>
|
||||
#undef U8X8_NO_HW_I2C // WLEDMM: we do want I2C hardware drivers - if possible
|
||||
//#define WIRE_INTERFACES_COUNT 2 // experimental - tell U8x8Lib that there is a econd Wire unit
|
||||
|
||||
#include "wled.h"
|
||||
#include <U8x8lib.h> // from https://github.com/olikraus/u8g2/
|
||||
#include "4LD_wled_fonts.c"
|
||||
|
||||
Reference in New Issue
Block a user