Skip to content

Figures

Every figure on this site is drawn by a Python module from facts extracted from the code, so it is rebuilt, not redrawn, when the code changes. CI runs hardfoc-docs figures --check and fails when a committed figure no longer matches the code. Each figure below lists the files it is drawn from.

Three layers, one of them yours

Layer diagram: the application calls the hardware-agnostic PCAL95555 driver, which owns the standard register map of both chips and the PCAL9555A-only Agile I/O bank, and uses the CRTP I2C interface, which calls the platform port you write, which drives the I2C bus and the INT line of the PCA9555 or PCAL9555A.Layer diagram: the application calls the hardware-agnostic PCAL95555 driver, which owns the standard register map of both chips and the PCAL9555A-only Agile I/O bank, and uses the CRTP I2C interface, which calls the platform port you write, which drives the I2C bus and the INT line of the PCA9555 or PCAL9555A.
Three layers, one of them yours
Figure description and sources

From top to bottom. Your application talks to one PCAL95555 object per chip. The core owns the chip's register map (listed from Pcal95555Reg in inc/pcal95555.hpp): the eight standard registers both chips have, and the Agile I/O bank only the PCAL9555A answers, which the driver guards after it has detected the variant. The communication interface (pcal95555::I2cInterface in inc/pcal95555_i2c_interface.hpp) is a CRTP base: three methods are required, the rest have defaults. The platform port is the only code you write. Below it is the chip.

Drawn from: inc/pcal95555.hpp Pcal95555Reg; inc/pcal95555_i2c_interface.hpp I2cInterface; figure module docs/diagrams/figures/driver-layers.py.

Figure module: docs/diagrams/figures/driver-layers.py

Drawn from: