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
139 downloads per month
7.5MB
11K
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