6 releases

new 0.2.1 Apr 23, 2025
0.2.0 Jan 25, 2025
0.1.3 Sep 3, 2024
0.1.2 Jul 19, 2024

#355 in Embedded development

Download history 101/week @ 2025-01-21 13/week @ 2025-01-28 14/week @ 2025-02-04 8/week @ 2025-02-11 1/week @ 2025-03-04 4/week @ 2025-03-11 139/week @ 2025-04-22

139 downloads per month

MPL-2.0 license

7.5MB
11K SLoC

C 10K SLoC // 0.1% comments Rust 866 SLoC // 0.0% comments Python 206 SLoC // 0.4% comments Batch 26 SLoC JavaScript 5 SLoC Shell 1 SLoC

Safe WiringX Rust bindings.

Example Blinker on pin 0 for Milk-V Duo S:

use wiringx::{Output, Platform, WiringX};

use std::{thread, time::Duration};

// Replace `Platform` with your platform
let wiringx = WiringX::new(Platform::MilkVDuoS).unwrap();

// We use pin `0`, for the built in LED
let mut pin = wiringx.gpio_pin::<Output>(0).unwrap();

loop {
 pin.toggle();
 thread::sleep(Duration::from_secs(1));
}

wiringX

Safe Rust port of the wiringX GPIO library.

Examples found in the examples folder next to this readme.

Examples are made for the Milk-V Duo S, but can easily be changed for other platforms by changing the selected platform in the enum and changing the pin number for the LED.

Dependencies

~0.6–7.5MB
~69K SLoC