Update T114 I2C pins for external RTC #1428
Merged
+2
−2
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.

While adding an external DS3231 RTC on the Heltec T114, I found that pins P0.26 and P0.27 are not exposed to headers. They are wired to a non-populated footprint for an onboard PCF8563TS RTC (see meshtastic/firmware#4605 for details).
Given this, replacing the default I2C pins would work for external RTCs, but may break backward compatibility if any T114 revision exists (or appears in the future) with the PCF8563TS populated.
An alternative approach would be to keep the existing default pins and add support for a second I2C bus, calling
AutoDiscoverRTCClock.begin()on bothWireandWire1. This would allow the firmware to pick-up the onboard RTC onWireif present, and fall back to discovering an external RTC onWire1otherwise.This was tested with a DS3231 on a T114 V2 using pins P0.16 and P0.13, and works correctly with this configuration.