linux_l6470 0.1.0

ST L6470 SPI driver for Embedded Linux
Documentation

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