1 unstable release
Uses old Rust 2015
0.1.0 | Jun 5, 2018 |
---|
#7 in #stepper
15KB
327 lines
L6470 driver for Linux in Rust
This library can be used to control one or more STMicroelectronics L6470 motor driver over SPI using the Rust programming language.
Prerequisites
You need a Linux Single Board Computer (SBC) with a SPI port enabled and some GPIO
See Linux SPIDEV doc See Linux Sysfs GPIO doc
Installing
A step by step series of examples that tell you how to get a development env running
Say what the step will be
extern crate linux_l6470;
use linux_l6470::L6470;
use linux_l6470::Motors;
use linux_l6470::Direction;
fn main() -> Result<(), std::io::Error> {
let driver = linux_l6470::L6470Connector::new("/dev/spidev1.0")
.build()?;
driver.init();
driver.send_run(Motors::all(), Direction::CW, 0xFFFFFFFF);
// driver.send_go_until(Motors::all(), Direction::CW, 0xFFFFFFFF);
Ok(())
}
Built With
- Rust Spidev - Linux SPI API with Rust
Versioning
We use SemVer for versioning.
Authors
- Dolt.ch (Samuel Dolt) - Initial work - Dolt.ch
License
This project is Licensed under either of
- Apache License, Version 2.0, (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)
at your option.
Contribution
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.
Bibliography
Dependencies
~2MB
~39K SLoC