#1-wire #one-wire #w1

owfs

Rust API for OWFS (1-Wire file system)

10 releases

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

#339 in Filesystem

Download history 4/week @ 2024-02-23 11/week @ 2024-03-01 3/week @ 2024-03-08 7/week @ 2024-03-15 5/week @ 2024-03-22 28/week @ 2024-03-29 8/week @ 2024-04-05 242/week @ 2024-05-03

242 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

~84KB