Crates.io | linux_l6470 |
lib.rs | linux_l6470 |
version | 0.1.0 |
source | src |
created_at | 2018-06-05 16:07:46.214443 |
updated_at | 2018-06-05 16:07:46.214443 |
description | ST L6470 SPI driver for Embedded Linux |
homepage | https://bitbucket.org/doltch/linux-l6470-rs |
repository | https://bitbucket.org/doltch/linux-l6470-rs |
max_upload_size | |
id | 68729 |
size | 14,715 |
This library can be used to control one or more STMicroelectronics L6470 motor driver over SPI using the Rust programming language.
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
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(())
}
We use SemVer for versioning.
Dolt.ch (Samuel Dolt) - Initial work - Dolt.ch
This project is Licensed under either of
at your option.
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.