commit | 8ff581220aaf38edda428d37ed1fe3151c0542d9 | [log] [tgz] |
---|---|---|
author | William A. Kennington III <wak@google.com> | Fri Oct 26 00:42:36 2018 -0700 |
committer | William A. Kennington III <wak@google.com> | Fri Oct 26 02:03:22 2018 -0700 |
tree | 59643fd54be7ed6c4ef6dcbc013e9dce1f800668 | |
parent | 88a89bc6bc63d9718cf73fac33eb4d241275cc5d [diff] |
utility/aspeed: Add gpio name to offset method Useful for converting from the GPIO name listed in the chip or board schematics to the offset which would be presented by the kernel. Made constexpr so that the conversions can be done at compile time. Ex: gpioplus::utility::aspeed::nameToOffset("B3") -> 11 Tested: Built and run through the unit test suite. Change-Id: I9ec859bf8fb6c60f15e149779d1bd3eb94fc1bd6 Signed-off-by: William A. Kennington III <wak@google.com>
gpioplus is a c++ wrapper around the linux gpio ioctl interface. It aims to provide c++ ergonomics to the usage.
Test cases require google{test,mock}, valgrind, and lcov.
For a standard release build, you want something like:
./bootstrap.sh ./configure --disable-tests make make install
For a test / debug build, a typical configuration is
./bootstrap.sh ./configure --enable-tests --enable-coverage --enable-valgrind make make check make check-valgrind make check-code-coverage