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:
@@ -202,12 +202,22 @@ void HalGPIO::begin() {
|
|||||||
SPI.begin(EPD_SCLK, SPI_MISO, EPD_MOSI, EPD_CS);
|
SPI.begin(EPD_SCLK, SPI_MISO, EPD_MOSI, EPD_CS);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if FREEINK_MCU_C3
|
||||||
_deviceType = detectDeviceTypeWithFingerprint();
|
_deviceType = detectDeviceTypeWithFingerprint();
|
||||||
|
|
||||||
if (deviceIsX4()) {
|
if (deviceIsX4()) {
|
||||||
pinMode(BAT_GPIO0, INPUT);
|
pinMode(BAT_GPIO0, INPUT);
|
||||||
pinMode(UART0_RXD, 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() {
|
void HalGPIO::update() {
|
||||||
|
|||||||
Reference in New Issue
Block a user