Simple C++ library that handles GPIO calls for BeagleBone Black
C++ QMake C
Switch branches/tags
Nothing to show
Clone or download
mkaczanowski Merge pull request #5 from Milack27/master
Make 'waitForEdge' return the value read from GPIO
Latest commit fa5e1c2 Dec 28, 2017
Permalink
Failed to load latest commit information.
GPIO Merge pull request #5 from Milack27/master Dec 28, 2017
QBeagleBoneBlackGPIO Create README.md May 5, 2015
.gitignore Added Qt shared lib Apr 15, 2015
BeagleBoneBlack-GPIO.cpp Move from nested Mar 16, 2014
README.md

README.md

BeagleBoneBlack-GPIO

Simple C++ library that handles GPIO calls for BeagleBone Black

Features and methods

  1. Easy operations on gpio names:
  1. Easy operations on gpio sysfs descriptors:
  • GPIOManager::exportPin - Export pin (equivalent to i.e echo "68" > /sys/class/gpio/export)
  • GPIOManager::unexportPin - Unexport pin (equivalent to i.e echo "68" > /sys/class/gpio/unexport)
  • GPIOManager::setDirection - Set direction (equivalent to i.e echo "in" > /sys/class/gpio/gpio68/direction)
  • GPIOManager::getDirection - Get direction (equivalent to i.e cat /sys/class/gpio/gpio68/direction)
  • GPIOManager::setValue - Set value (equivalent to i.e echo "1" > /sys/class/gpio/gpio68/value)
  • GPIOManager::getValue - Get value (equivalent to i.e cat /sys/class/gpio/gpio68/value)
  • GPIOManager::setEdge - Set edge (equivalent to i.e echo "rising" > /sys/class/gpio/gpio68/edge)
  • GPIOManager::getEdge - Get edge (equivalent to i.e cat /sys/class/gpio/gpio68/edge)
  • GPIOManager::waitForEdge - Wait for edge event
  • GPIOManager::countExportedPins - Count already exported pins
  • GPIOManager::clean - Unexport all of already exported pins
  1. Export/unexport sanity check
  2. Table with pins being exported by default

Compilation

g++ GPIO/GPIOConst.cpp GPIO/GPIOManager.cpp BeagleBoneBlack-GPIO.cpp -o example