#1-wire #one-wire #w1

owfs

Rust API for OWFS (1-Wire file system)

10 releases

0.1.0 May 8, 2024
0.0.9 May 7, 2024
0.0.8 Jun 3, 2022

#512 in Filesystem

24 downloads per month

MIT license

15KB
418 lines

owfs-rs

Rust API for OWFS (1-Wire file system)

Example:

// OWFS guard object, automatically calls `owcapi::OW_finish` on drop
let _og = owfs::init("localhost:4304").unwrap();
let devices = owfs::scan(owfs::ScanOptions::default()).unwrap();
for d in devices {
    dbg!(&d.info());
    if d.attrs().contains(&"PIO.1") {
        d.set("PIO.1", "1").unwrap();
    }
}

Requires libow and libowcapi to be installed on the host. It is also possible to tell the crate to compile the library from source (specify vendored feature).

Dependencies

~105KB