5 releases

0.2.1 Oct 29, 2020
0.2.0 Oct 29, 2020
0.1.2 Sep 21, 2020
0.1.1 Sep 21, 2020
0.1.0 Sep 21, 2020

#1721 in Hardware support

Apache-2.0

25KB
452 lines

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.

Dependencies

~3.5MB
~72K SLoC