c2-mmap-gpio

Crates.ioc2-mmap-gpio
lib.rsc2-mmap-gpio
version0.2.1
sourcesrc
created_at2020-09-21 15:30:30.79138
updated_at2020-10-29 01:45:42.241878
descriptionODROID-C2 bindings for GPIO using memory-mapping
homepage
repositoryhttps://github.com/Killavus/c2-mmap-gpio
max_upload_size
id291198
size31,298
Marcin Grzywaczewski (Killavus)

documentation

README

ODROID-C2 GPIO bindings

Crates.io

This project provides a way to interact with ODROID-C2 GPIO pins directly through memory mapped GPIO registers.

Requirements

  • ODROID-C2 SBC, revision 2. Currently values for GPIO pins are hardcoded in the library so rev1 aren't going to work.
  • Linux OS on ODROID-C2. This library has been tested on Ubuntu 18.04 LTS.

Rationale

This library provides a direct access to GPIO pins - bypassing sysfs layer (which is used by sysfs-gpio crate, for example) to make accesses faster. I needed this capability while interacting with DHT11 thermal sensor because it was hard to implement its protocol with speeds provided by sysfs-gpio. This is propably not because sysfs by itself is slow - but sysfs-gpio crate was reopening sysfs resources every call which unfortunately took too long.

Core idea of this library and implementation is basically a rewrite in Rust of wiringPi library forked for this device.

What's missing?

  • Tests. I have little to none experience with embedded systems so I need to figure out how to do it. Contributions are welcome!

License

See LICENSE file.

Commit count: 11

cargo fmt