|
XPoint 0.1.0
Hardware-agnostic crosspoint matrix routing library
|
Transparent I2C bus-multiplexer adapter for the TCA9548A / PCA9548A. More...
#include "I2CInterface.h"Go to the source code of this file.
Classes | |
| class | TCA9548AInterface |
| I2C channel-select decorator for the TCA9548A / PCA9548A. More... | |
Transparent I2C bus-multiplexer adapter for the TCA9548A / PCA9548A.
Drop this decorator between any I2CInterface consumer (e.g. MCP23017Driver) and the physical bus (e.g. WireI2C) to transparently route I2C traffic through a specific channel of a TCA9548A / PCA9548A bus multiplexer.
Capacity: one TCA9548A provides 8 independent I2C segments; up to 8 TCA9548As share one bus (addresses 0x70–0x77), giving 64 segments total. Each segment supports up to 8 MCP23017s (address pins A0–A2), so the maximum reachable I/O is 64 × 8 × 16 = 8192 pins from a single bus.
Performance: a per-mux channel cache (8 bytes of BSS) ensures the channel-select byte is only sent when the active channel actually changes. After warm-up, a relay operation on an already-selected channel incurs zero extra I2C transactions — identical overhead to having no mux at all.
Usage: