# Driver-chip libraries
One TOML file per driver chip: the chip ids, the vendor's default serial
clock, the 20-byte chip-control block, and either the addressed register
table (record 0x84) or the `SChipCustom` block for the non-addressed parts.
`[chip] library` in a panel spec names one by path.
Each file carries a `status` saying what the values rest on:
| `verified` | driven on a bench; the header names the card and firmware |
| `derived` | taken from vendor configuration files or vendor binaries; the header says how many agreed |
| `stub` | a placeholder that is not expected to work |
`sm16269s.toml` is the only `verified` library: it is the register table the
P2.5 128x64 SM16269S module was driven with on a Colorlight E120 running
firmware 16.53.
## The derived families
Most files here are generated by `scripts/corpus-mine.py` from the vendor
`.rcvbp` corpus (`vendor/led-config-files` plus the configs bundled in
LEDVISION, 2,381 files): one library per driver-chip family with at least 20
files (the popular options only), holding the per-byte mode of the identity
bytes, the chip-control block and the register table (addressed chips) or the
`SChipCustom` block (non-addressed chips). The header of each file gives the
file count, the agreement and three example sources. Regenerate with
`python3 scripts/corpus-mine.py`; do not hand-edit those files.
Chip names come from the vendor device library's name tables
(`chip-names.json` here, 299 ids).
- A derived library is a vendor default for that family, not a measurement.
- Chip-control bytes 7-8, 10-13 (the GCLK counts) and 16 vary with scan and
refresh inside a family; the library carries the most common value and the
per-byte agreement line shows where. For a new panel, compare against a
vendor file for that exact module when one exists.
- Register 0x02 is replaced by scan-1 on load; the other registers are the
corpus mode, with the lowest per-register agreement stated.
- Families below the file threshold, or whose control block agrees in fewer
than half the files, are not emitted; the generator's output names them.
The rest are hand-written from the vendor binaries, and say so in their own
headers: `sm16269-defaults.toml`, `sm16269-defaults-revised.toml` and
`sm16169s-reset-defaults.toml`. `sm16269s-0x214-stub.toml` is the `stub`.