Skip X3 fingerprint probe on non-C3 boards

Prevent I2C pin collision on S3/ESP32 boards by skipping the X3/X4 fingerprint probe. The probe's I2C pins (GPIO20/0) conflict with onboard peripherals like the BQ27220 gauge and reconfigure strapping pins. Force deviceType to X4 for non-C3 builds.
This commit is contained in:
Justin Mitchell
2026-06-15 12:26:21 -04:00
parent 204aff6be6
commit 9b7b9e9094
+10
View File
@@ -202,12 +202,22 @@ void HalGPIO::begin() {
SPI.begin(EPD_SCLK, SPI_MISO, EPD_MOSI, EPD_CS);
#endif
#if FREEINK_MCU_C3
_deviceType = detectDeviceTypeWithFingerprint();
if (deviceIsX4()) {
pinMode(BAT_GPIO0, INPUT);
pinMode(UART0_RXD, INPUT);
}
#else
// Non-C3 boards (S3/ESP32) are single-device builds; their pins, panel, and
// battery backend all come from BoardConfig::ACTIVE. The X3/X4 fingerprint probe
// targets Xteink C3 hardware and drives Wire on X3_I2C_SDA/SCL (GPIO20/0) — which
// collides with this board's own I2C (e.g. Sticky's BQ27220 gauge shares GPIO0)
// and reconfigures strapping pins. Skip it; _deviceType stays X4 ("not X3"),
// the correct non-X3 branch for every deviceIsX3() consumer.
_deviceType = DeviceType::X4;
#endif
}
void HalGPIO::update() {