meshtastic / firmware

Meshtastic device firmware
https://meshtastic.org
GNU General Public License v3.0
3.51k stars 865 forks source link

heltec-ht62-esp32c3-sx1262: Assign GPIO18 and GPIO19 to I2C #4147

Closed ndoo closed 2 months ago

ndoo commented 4 months ago

I2C is not defined on schematics, but these are the only free GPIO exposed on the castellated pads.

There are pin mux conflicts: GPIO18 = USB_DN and GPIO19 = USB_DP.

Since the HT-DEV-ESP provides a CP2102, re-use these ports for I2C instead since it's more useful (attaching peripherals vs. connecting to a host PC). Boards which use the native ESP32 USB will require a separate variant (refer to Heltec HRU-3601 variant for example).

Perhaps a "heltec_esp32c3_usb" variant would make things easier?

Took the opportunity to clean up the variant's header files too.

Relevant forum post/discussion in Heltec HT-CT62 support - Meshtastic’s future?#14.

meshtastic-bot commented 4 months ago

This pull request has been mentioned on Meshtastic. There might be relevant details there:

https://meshtastic.discourse.group/t/heltec-ht-ct62-support-meshtastics-future/11391/15

ndoo commented 4 months ago

Pushed changes to address the review feedback.

Still very much an RFC, given the very limited GPIO available, we have to figure out what mapping makes the most sense for the community.

Why Heltec exposed GPIO that were already connected to the SX1262 beats me, probably just due to PCB routing limitations or not using blind vias, with however many layers they are using.