Crates.io | kpal-gpio-cdev |
lib.rs | kpal-gpio-cdev |
version | 0.2.2 |
source | src |
created_at | 2019-12-14 10:36:08.369456 |
updated_at | 2020-03-08 07:33:16.120727 |
description | A KPAL plugin for the Linux GPIO char device |
homepage | |
repository | https://github.com/kmdouglass/kpal |
max_upload_size | |
id | 189328 |
size | 10,710 |
A KPAL plugin for the Linux GPIO character device API.
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.
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
.