Skip to main content

Module hwcaps

Module hwcaps 

Source
Expand description

Probed hardware-capability contract.

The agent must not trust hardware declarations (a board YAML, an ffmpeg -encoders listing, a vendor wrapper that is present but backed by no real device). It must derive capabilities by probing the real silicon: read the sysfs / device-tree node, issue the ioctl, or trial-init the device, and record the evidence that produced the answer.

This module is the typed result shape that crosses process boundaries: every probe returns a Probed<T>, and a full snapshot is a HardwareCapabilities. The probes themselves (the I/O) live in the ados-hal-probe crate; this crate only owns the contract so any service — Rust or, over the state socket, Python — can read it.

§Why Probed<T> and not Option<T>

An Option collapses “we looked and it is genuinely not there” with “we did not look” and with “the thing advertised itself but failed when we trial-ran it”. Those three answers drive different agent behavior (fall back to software, defer the probe, blacklist a lying wrapper), so they are distinct variants here and each carries the evidence or the reason behind it.

Structs§

CoreCluster
One homogeneous cluster of CPU cores (a big.LITTLE rig has more than one).
EncoderDevice
A confirmed hardware H.264 encoder device: a real node that enumerates an H.264 output FourCC (H264) and accepted a bounded trial init.
HardwareCapabilities
A full probed hardware-capability snapshot.
Midr
A CPU main-ID-register value (MIDR_EL1-style), as read from /proc/cpuinfo’s CPU implementer / CPU part fields.
SerialPort
A serial port the agent may attach a flight controller (or other UART peripheral) to.
SocCompatible
The SoC’s /proc/device-tree/compatible strings (most-specific first).
UsbId
A USB (idVendor, idProduct) pair.
V4l2Node
A V4L2 node found under /dev, with the formats it enumerates on its output (the format a memory-to-memory encoder produces).

Enums§

AbsenceReason
Why a capability was concluded Probed::Absent.
Evidence
What concretely proved a Probed::Present answer.
ProbePhase
When a probe runs.
Probed
The outcome of one capability probe.

Functions§

is_rc_bridge_usb_id
Whether a USB (vid, pid) identifies a bridge commonly fronting an ExpressLRS / CRSF RC transmitter module: a CP2102 (10c4:ea60), a CH340 (1a86:7523), or any Espressif native-USB device (303a:*, an ESP32-S3-based module).