|
Thunderbots Project
|
#include <gpio_char_dev.h>


Public Member Functions | |
| GpioCharDev (uint32_t gpio_number, GpioDirection direction, GpioState state, std::string char_dev_path="/dev/gpiochip0") | |
| virtual | ~GpioCharDev () |
| void | setValue (GpioState state) override |
| GpioState | getValue () override |
GPIO with the character device interface
Available on Linux kernels 5.10 and later.
| GpioCharDev | ( | uint32_t | gpio_number, |
| GpioDirection | direction, | ||
| GpioState | state, | ||
| std::string | char_dev_path = "/dev/gpiochip0" |
||
| ) |
Communicate with GPIO pins via the new GPIO character device interface: https://www.kernel.org/doc/html/next/userspace-api/gpio/chardev.html
| gpio_number | The gpio number |
| direction | The direction of the gpio |
| state | The initial state of the gpio |
| char_dev_path | The path to the gpio character device |
|
virtual |
Destructor
|
overridevirtual |
Get the current state of the gpio
Implements Gpio.
|
overridevirtual |