From 5f852a1c059aeab84448809c04941c403fa48f58 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20G=C3=B6ttgens?= Date: Tue, 3 Mar 2026 08:55:53 +0100 Subject: [PATCH] Add ADS1115 ADC to recognition as used on RAK6421 Hat (#9790) --- src/detect/ScanI2C.h | 3 ++- src/detect/ScanI2CTwoWire.cpp | 15 +++++++++++---- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/src/detect/ScanI2C.h b/src/detect/ScanI2C.h index 7b575dd63..f812a9c96 100644 --- a/src/detect/ScanI2C.h +++ b/src/detect/ScanI2C.h @@ -92,7 +92,8 @@ class ScanI2C SEN5X, SFA30, CW2015, - SCD30 + SCD30, + ADS1115 } DeviceType; // typedef uint8_t DeviceAddress; diff --git a/src/detect/ScanI2CTwoWire.cpp b/src/detect/ScanI2CTwoWire.cpp index c58a58518..f51dc5b5e 100644 --- a/src/detect/ScanI2CTwoWire.cpp +++ b/src/detect/ScanI2CTwoWire.cpp @@ -718,11 +718,18 @@ void ScanI2CTwoWire::scanPort(I2CPort port, uint8_t *address, uint8_t asize) if (len == 5 && memcmp(expectedInfo, info, len) == 0) { LOG_INFO("NXP SE050 crypto chip found"); type = NXP_SE050; - - } else { - LOG_INFO("FT6336U touchscreen found"); - type = FT6336U; + break; } + + registerValue = getRegisterValue(ScanI2CTwoWire::RegisterLocation(addr, 0x01), 2); + if (registerValue == 0x8583 || registerValue == 0x8580) { + type = ADS1115; + logFoundDevice("ADS1115 ADC", (uint8_t)addr.address); + break; + } + + LOG_INFO("FT6336U touchscreen found"); + type = FT6336U; break; }