Skip to main content

Module util

Module util 

Source
Expand description

Small helpers shared across the command modules.

Functions§

await_any_frame
Like await_reply but offers every frame, not only the card’s.
await_reply
Poll dev until wait runs out or pick accepts a frame from the card.
contains_lattice_header
True when a bitstream header appears anywhere in d.
has_lattice_header
True when a bitstream’s text header sits within its first 256 bytes.
hex
Two lowercase hex digits per byte, sep between them.
hexdump
is_card_frame
True for frames sent by the card back to the PC.
is_our_frame
True for our own transmissions, which the kernel loops back to us.
is_sender_frame
True for frames sent by the sender/PC to the card.
mac
Format a MAC address for display.
open
Open the raw link on the context’s interface.
parse_color
RRGGBB (optionally #-prefixed) or three decimal components.
warn
A non-fatal problem, on stderr in the same shape as an error.