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 PCA9685 driver, which uses the CRTP I2C interface, which calls the platform port you write, which drives the I2C bus and the 16 PWM outputs of the PCA9685.Layer diagram: the application calls the hardware-agnostic PCA9685 driver, which uses the CRTP I2C interface, which calls the platform port you write, which drives the I2C bus and the 16 PWM outputs of the PCA9685.
Three layers, one of them yours
Figure description and sources

From top to bottom. Your application talks to one PCA9685 object, whose public calls (listed from inc/pca9685.hpp) set the frequency, the channels and the output stage. Each call turns into register reads and writes with retries. The communication interface (I2cInterface in inc/pca9685_i2c_interface.hpp) is a CRTP base that forwards them to your class. The platform port is the only code you write: a class that brings the I2C bus up and moves register bytes over it. Below it is the hardware.

Drawn from: inc/pca9685.hpp PCA9685 public calls; inc/pca9685_i2c_interface.hpp I2cInterface; figure module docs/diagrams/figures/driver-layers.py.

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

Drawn from: