Creates an implementation of an os-independent Gpio object from a hardware-specific static Gpio structure.
More...
#include <GpioWrapper.hxx>
|
| constexpr | GpioWrapper () |
| | This constructor is constexpr which ensures that the object can be initialized in the data section.
|
| |
| void | write (Value new_state) const OVERRIDE |
| | Writes a GPIO output pin (set or clear to a specific state).
|
| |
| void | set () const OVERRIDE |
| | Sets the GPIO output pin to high.
|
| |
| void | clr () const OVERRIDE |
| | Clears the GPIO output pin to low.
|
| |
| Value | read () const OVERRIDE |
| | Retrieves the current Value of a GPIO input pin.
|
| |
| void | set_direction (Direction dir) const OVERRIDE |
| | Sets the GPIO direction.
|
| |
| Direction | direction () const OVERRIDE |
| | Gets the GPIO direction.
|
| |
| constexpr | Gpio () |
| | Constructor.
|
| |
| void | write (bool new_state) const |
| | Writes a GPIO output pin (set or clear to a specific state).
|
| |
| bool | is_set () const |
| | Tests the GPIO input pin to see if it is set.
|
| |
| bool | is_clr () const |
| | Tests the GPIO input pin to see if it is clear.
|
| |
|
| enum | Value : bool { CLR = false
, SET = true
, VLOW = CLR
, VHIGH = SET
} |
| | Defines the options for GPIO level. More...
|
| |
| enum class | Direction { DINPUT
, DOUTPUT
} |
| | Defines the options for GPIO direction. More...
|
| |
template<class PIN>
class GpioWrapper< PIN >
Creates an implementation of an os-independent Gpio object from a hardware-specific static Gpio structure.
Does not permit changing the direction of the hardware pin. For an example usage, see BLINKER_Pin::instance() in BlinkerGPIO.hxx.
Definition at line 45 of file GpioWrapper.hxx.
◆ GpioWrapper()
This constructor is constexpr which ensures that the object can be initialized in the data section.
Definition at line 50 of file GpioWrapper.hxx.
◆ clr()
◆ direction()
Gets the GPIO direction.
- Returns
- INPUT or OUTPUT
Implements Gpio.
Definition at line 88 of file GpioWrapper.hxx.
◆ instance()
◆ read()
Retrieves the current Value of a GPIO input pin.
- Returns
- SET if currently high, CLR if currently low.
Implements Gpio.
Definition at line 69 of file GpioWrapper.hxx.
◆ set()
◆ set_direction()
◆ write()
Writes a GPIO output pin (set or clear to a specific state).
- Parameters
-
| new_state | the desired output state. See Value. |
Implements Gpio.
Definition at line 54 of file GpioWrapper.hxx.
◆ instance_
The documentation for this class was generated from the following file: