kpal-gpio-cdev

Crates.iokpal-gpio-cdev
lib.rskpal-gpio-cdev
version0.2.2
sourcesrc
created_at2019-12-14 10:36:08.369456
updated_at2020-03-08 07:33:16.120727
descriptionA KPAL plugin for the Linux GPIO char device
homepage
repositoryhttps://github.com/kmdouglass/kpal
max_upload_size
id189328
size10,710
Kyle M. Douglass (kmdouglass)

documentation

README

kpal-gpio-cdev

Docs.rs Crates.io

A KPAL plugin for the Linux GPIO character device API.

Overview

kpal-gpio-cdev is a wrapper around the Rust gpio-cdev library. The GPIO character device ABI is the modern interface between users and a Linux kernel that is controllig GPIO devices.

Getting started

Cross-compiling for ARMv7

The ARMv7 instruction set architecture (ISA) is used by the Raspberry Pi Model 3, among other systems. To compile this plugin for the ARMv7 first make sure that you have an ARMv7 Rust toolchain installed. You will also need a linker. On Ubuntu-like systems, this can be obtained from one of many packages, such as gcc-arm-linux-gnueabihf:

$ rustup target add armv7-unknown-linux-gnueabihf
$ sudo apt install gcc-arm-linux-gnueabihf

To configure the linker for this architecture, add the following lines to $HOME/.cargo/config:

[target.armv7-unknown-linux-gnueabihf]
linker = "arm-linux-gnueabihf-gcc"

To build the library for the ARMv7 ISA, run the following from this directory:

cargo build --target=armv7-unknown-linux-gnueabihf

The artifacts should be found inside the target directory of the kpal root directory ../target/armv7-unknown-linux-gnueabihf.

Commit count: 239

cargo fmt