TTGO T-Beam v10 PMU init bugfix
This commit is contained in:
parent
81f1bc5c70
commit
5ca4d2f721
@ -14,12 +14,7 @@ int i2c_scan(void) {
|
|||||||
|
|
||||||
for (addr = 8; addr <= 119; addr++) {
|
for (addr = 8; addr <= 119; addr++) {
|
||||||
|
|
||||||
// scan i2c bus with no more to 100KHz
|
// scan i2c bus with no more to 100KHz
|
||||||
#ifdef HAS_DISPLAY
|
|
||||||
Wire.begin(MY_OLED_SDA, MY_OLED_SCL, 100000);
|
|
||||||
#else
|
|
||||||
Wire.begin(SDA, SCL, 100000);
|
|
||||||
#endif
|
|
||||||
Wire.beginTransmission(addr);
|
Wire.beginTransmission(addr);
|
||||||
Wire.write(addr);
|
Wire.write(addr);
|
||||||
i2c_ret = Wire.endTransmission();
|
i2c_ret = Wire.endTransmission();
|
||||||
|
@ -169,6 +169,13 @@ void setup() {
|
|||||||
ESP_LOGI(TAG, "TinyGPS+ version %s", TinyGPSPlus::libraryVersion());
|
ESP_LOGI(TAG, "TinyGPS+ version %s", TinyGPSPlus::libraryVersion());
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
// open i2c bus
|
||||||
|
#ifdef HAS_DISPLAY
|
||||||
|
Wire.begin(MY_OLED_SDA, MY_OLED_SCL, 100000);
|
||||||
|
#else
|
||||||
|
Wire.begin(SDA, SCL, 100000);
|
||||||
|
#endif
|
||||||
|
|
||||||
// setup power on boards with power management logic
|
// setup power on boards with power management logic
|
||||||
#ifdef EXT_POWER_SW
|
#ifdef EXT_POWER_SW
|
||||||
pinMode(EXT_POWER_SW, OUTPUT);
|
pinMode(EXT_POWER_SW, OUTPUT);
|
||||||
@ -180,6 +187,7 @@ void setup() {
|
|||||||
strcat_P(features, " PMU");
|
strcat_P(features, " PMU");
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
// scan i2c bus for devices
|
||||||
i2c_scan();
|
i2c_scan();
|
||||||
|
|
||||||
#endif // verbose
|
#endif // verbose
|
||||||
|
Loading…
Reference in New Issue
Block a user