Skip to content

Killavus/c2-mmap-gpio

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

Rust GPIO memory-mapped bindings for ODROID-C2

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages