linux_l6470

Crates.iolinux_l6470
lib.rslinux_l6470
version0.1.0
sourcesrc
created_at2018-06-05 16:07:46.214443
updated_at2018-06-05 16:07:46.214443
descriptionST L6470 SPI driver for Embedded Linux
homepagehttps://bitbucket.org/doltch/linux-l6470-rs
repositoryhttps://bitbucket.org/doltch/linux-l6470-rs
max_upload_size
id68729
size14,715
Sam Dolt (samdolt)

documentation

README

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

Versioning

We use SemVer for versioning.

Authors

  • Dolt.ch (Samuel Dolt) - Initial work - Dolt.ch

License

This project is Licensed under either of

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

Commit count: 0

cargo fmt