1 个不稳定版本
使用旧的Rust 2015
0.1.0 | 2016年1月31日 |
---|
#1728 in 硬件支持
5KB
92 行
圆形库 
######RaspberryPi GPIO库 - 文档
在RaspberryPi上交叉编译,请遵循以下说明:https://github.com/Ogeon/rust-on-raspberry-pi
#示例
#![allow(deprecated)]
extern crate cylus;
use cylus::Cylus;
fn main() {
println!("Starting..");
let gpio = Cylus::new(24);
for _ in 1..10 {
println!("{}", gpio.read());
gpio.high();
std::thread::sleep_ms(1000);
println!("{}", gpio.read());
gpio.low();
std::thread::sleep_ms(1000);
}
}
#待办事项
- 在raspberrypi上运行Rust
- 阅读BCM2835 ARM外设手册
- 使其工作
#转换为库
- 简单的数字GPIO输入/输出
- 添加PWM功能
- 发布到crates.io
依赖关系
~380–610KB