Skip to main content

Crate neoradio2

Crate neoradio2 

Source
Expand description

Safe Rust bindings for the Intrepid Control Systems neoRAD-IO2 device family.

use neoradio2::{Device, CalType};
for info in Device::find()? {
    let dev = Device::open(&info)?;
    dev.chain_identify()?;
    dev.app_start(0, 0xFF)?;
    dev.request_sensor_data(0, 0xFF, CalType::Enabled)?;
    println!("{}", dev.read_sensor_float(0, 0)?);
}

Modules§

raw
Raw repr(C) structs used by the settings/calibration/statistics calls.

Structs§

Device
An open connection to a neoRAD-IO2 chain (closed automatically on drop).
DeviceInfo
Information about a discovered neoRAD-IO2 USB device.

Enums§

CalType
Sensor read calibration mode.
CommandStatus
Command status returned by Device::status.
DeviceType
neoRAD-IO2 device type.
Error
Errors returned by the neoRAD-IO2 API.
LedMode
LED toggle mode.
StatusType
Status query type (see Device::status).

Functions§

is_blocking
Whether the API is in blocking mode.
set_blocking
Set process-global blocking mode. In blocking mode, calls wait up to timeout for completion; in non-blocking mode they return immediately.

Type Aliases§

Result
Crate result type.