1
0
mirror of https://github.com/DCC-EX/CommandStation-EX.git synced 2025-07-30 19:03:44 +02:00

Allow extended I2C addresses to be specified in non-extended configuration

If an extended I2C address is specified (including mux and/or subbus) then these parameters are ignored, but a warning output to the diagnostic console.
This commit is contained in:
Neil McKechnie
2023-02-18 09:32:38 +00:00
parent 9797a0fd2d
commit 173676287c
2 changed files with 26 additions and 4 deletions

View File

@@ -350,4 +350,10 @@ void I2CAddress::toHex(const uint8_t value, char *buffer) {
*ptr++ = bits > 9 ? bits-10+'a' : bits+'0';
bits = value & 0xf;
*ptr++ = bits > 9 ? bits-10+'a' : bits+'0';
}
}
#if !defined(I2C_EXTENDED_ADDRESS)
/* static */ bool I2CAddress::_addressWarningDone = false;
#endif