Crates.io | r2d2-pal |
lib.rs | r2d2-pal |
version | 0.1.11 |
source | src |
created_at | 2024-11-26 08:35:37.389931 |
updated_at | 2024-11-26 08:35:37.389931 |
description | An I/O device communication module written in Rust. |
homepage | |
repository | |
max_upload_size | |
id | 1461325 |
size | 18,719 |
"Rust Reliable Device Drivers"
r2d2-pal (R2D2 Protocol Abstraction Layer) is a module to define Rust bindings for Python of the linux_embedded_hal crate.
pip install -U r2d2-pal
Serial example:
import r2d2
bus = r2d2.SerialBus(
port_name=port_name,
baud_rate=baud_rate,
byte_size=byte_size,
parity=str(parity),
stop_bits=stop_bits,
)
bus.write(b"Hello, World!")
data = bus.read(13, 10.0)