#![doc = include_str!("../README.md")]
pub mod bindings;
pub mod board_sidecar;
pub mod camera_probe;
pub mod daemon;
pub mod host_facts;
pub mod probe;
pub mod runner;
pub mod sensor_hub;
pub use ados_protocol::hwcaps::{
AbsenceReason, CoreCluster, EncoderDevice, Evidence, HardwareCapabilities, Midr, ProbePhase,
Probed, SerialPort, SocCompatible, UsbId, V4l2Node,
};
pub use probe::{
cpu::probe_cores, serial::probe_serial_ports, soc::probe_soc, usb::probe_usb_ids,
video::probe_h264_encoder,
};
pub use runner::{run_probe_sandboxed, ProbeOutcome};
pub fn probe_all(phase: ProbePhase, crsf_pin: Option<&str>) -> HardwareCapabilities {
HardwareCapabilities {
cpu: probe_cores(),
soc: probe_soc(),
h264_encoder: probe_h264_encoder(phase),
usb: probe_usb_ids(),
serial: probe_serial_ports(crsf_pin),
}
}
#[cfg(test)]
mod tests {
use super::*;
#[test]
fn probe_all_runtime_defers_destructive_encoder_probe() {
let caps = probe_all(ProbePhase::Runtime, None);
assert!(matches!(caps.h264_encoder, Probed::NotProbed));
}
}