Expand description
Calibration EEPROM serialization.
Structsยง
- Calib
Entry - Per-key full-travel calibration value stored in EEPROM.
Constantsยง
- CALIB_
BUF_ LEN - Pre-computed buffer length for the HE matrix.
- CRC16 ๐
- CRC-16/CCITT-FALSE (poly 0x1021, init 0xFFFF).
- CRC_LEN ๐
- Byte length of the trailing CRC field.
- EEPROM_
BASE_ ADDR - EEPROM word address at which the calibration block begins.
- ENTRY_
LEN ๐ - Byte length of a single serialized entry (one u16 full-travel value).
- HEADER_
LEN ๐ - Byte length of the header: magic + version.
- MAGIC ๐
- Magic number identifying a valid Q6 HE calibration block.
- VERSION ๐
- Format version. Must be incremented on any incompatible layout change.
Functionsยง
- read_
array ๐ - Copy exactly
Nbytes frombuf[start..end]into a fixed-size array. - serialize
- Serialize
entries(row-major,ROW ร COL) intobuf. - total_
len - Compute the total serialized byte length for a
rows ร colsmatrix. - try_
deserialize - Attempt to deserialize a calibration block from
bufintoout.