|
Open Model Railroad Network (OpenMRN)
|
Defines a GPIO output pin. More...
#include <LinuxGpio.hxx>
Static Public Member Functions | |
| static void | export_pin () |
| Export pin. | |
| static void | set_output () |
| Sets pin to output. | |
| static void | set_input () |
| Sets pin to input. | |
| static void | set_on () |
| Sets output to HIGH. | |
| static void | set_off () |
| Sets output to LOW. | |
| static bool | get () |
| static void | set (bool value) |
| Set output pin level. | |
| static void | toggle () |
| Toggles output pin value. | |
| static bool | is_output () |
Static Public Attributes | |
| static constexpr const uint32_t | PIN = PIN_NUM |
| Number of the pin. | |
Defines a GPIO output pin.
Writes to this structure will change the output level of the pin. Reads will return the pin's current level. Uses Linux sysfs ABI
The pin is set to output at initialization time, with the level defined by ‘SAFE_VALUE’.
Do not use this class directly. Use GPIO_PIN instead.
Definition at line 87 of file LinuxGpio.hxx.
|
inlinestatic |
Export pin.
Definition at line 94 of file LinuxGpio.hxx.
Definition at line 146 of file LinuxGpio.hxx.
Definition at line 175 of file LinuxGpio.hxx.
Set output pin level.
| value | is the level to set to. |
Definition at line 156 of file LinuxGpio.hxx.
|
inlinestatic |
Sets pin to input.
Definition at line 116 of file LinuxGpio.hxx.
|
inlinestatic |
Sets output to LOW.
Definition at line 137 of file LinuxGpio.hxx.
|
inlinestatic |
Sets output to HIGH.
Definition at line 128 of file LinuxGpio.hxx.
|
inlinestatic |
Sets pin to output.
Definition at line 104 of file LinuxGpio.hxx.
|
inlinestatic |
Toggles output pin value.
Definition at line 169 of file LinuxGpio.hxx.
|
staticconstexpr |
Number of the pin.
Definition at line 91 of file LinuxGpio.hxx.