Skip to main content

Crate litz_decode

Crate litz_decode 

Source
Expand description

Decode UART, I2C and SPI from probed digital waveforms.

A waveform is a record of level changes, not a sampled grid: each entry is the level after a change, held until the next entry. The first entry is the level when recording started. All times are ticks (1 ns).

Decoders are deliberately tolerant: empty, short or out-of-order records yield no frames or best-effort frames rather than a panic. Where the protocol leaves room for interpretation the choice is documented on the decoder.

Structs§

Frame
One decoded frame or bus transaction.
Wave
A read-only view over a recorded waveform.

Enums§

SpiMode

Functions§

i2c
Decode complete I2C transactions from SDA and SCL recordings.
infer_baud
Bit period from the shortest run, rounded to the nearest integer baud.
spi
Decode SPI frames from SCK, MOSI, optional MISO and CS recordings.
uart
Decode UART frames at baud, or at the inferred baud when None.