Devices
The parts a board file can use. Each page has the part's board-file keys, an
example, what its front-panel widget does, the events it logs, the actions
--input can send it, and what the model leaves out.
| Kind | Part | Connects over |
|---|---|---|
led | an LED | a GPIO |
button | a push button | a GPIO |
encoder | a rotary encoder | two GPIOs |
mcp23008 | Microchip MCP23008 8-bit port expander | I2C |
st7789 | Sitronix ST7789 TFT controller | SPI |
ws2812 | WS2812 / SK6812 LED chain | one GPIO (usually PIO) |
dac8165 | TI DAC8165 quad 14-bit DAC | bit-banged serial (usually PIO) |
sdcard | SDHC card in SPI mode | SPI |
cyw43439 | Infineon CYW43439 Wi-Fi + Bluetooth (Pico W) | gSPI over PIO |
tartelette parts KIND prints the same key list as each page, straight from
the code.
Common ideas
Pins are GPIO numbers, 0 to 29. A pin belongs to one part, except where a page says it can be shared.
Buses: parts with a bus key sit on an SPI or I2C controller declared
under [buses]. A part with no bus is on the board but connected to
nothing, which is occasionally useful while you are wiring up a board file.
Events are what a part reports as the firmware drives it: an LED turning on, a frame latched into an LED chain, a DAC output changing. Headless runs print them on stderr with the emulated time:
[ 14600.0 us] dac dac=147455
Actions are what the outside world does to a part: press a button, turn a
knob. The panel sends them when you click; headless, --input NAME:ACTION=VALUE@US sends one at a given time, and --press NAME@US+HOLD is
a shortcut for buttons.
mhz appears on parts that measure time on their pins. It is the core
clock, used to turn microseconds into cycles. Leave it at 125.
Writing a new one
See development.md.