|
Open Model Railroad Network (OpenMRN)
|
Public Member Functions | |
| constexpr | PersistentGpio (const Gpio *impl, const unsigned bit_ofs) |
| void | restore () const |
| 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. | |
Public Member Functions inherited from Gpio | |
| 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. | |
Private Attributes | |
| const Gpio * | impl_ |
| Implementation of the gpio object. | |
| const unsigned | bit_ |
| Implementation of the gpio object. | |
Additional Inherited Members | |
Public Types inherited from Gpio | |
| 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... | |
Definition at line 44 of file PersistentGPIO.hxx.
|
inlineconstexpr |
Definition at line 47 of file PersistentGPIO.hxx.
|
inlinevirtual |
Clears the GPIO output pin to low.
Implements Gpio.
Definition at line 69 of file PersistentGPIO.hxx.
|
inlinevirtual |
Gets the GPIO direction.
Implements Gpio.
Definition at line 88 of file PersistentGPIO.hxx.
|
inlinevirtual |
Retrieves the current Value of a GPIO input pin.
Implements Gpio.
Definition at line 75 of file PersistentGPIO.hxx.
|
inline |
Definition at line 53 of file PersistentGPIO.hxx.
|
inlinevirtual |
Sets the GPIO output pin to high.
Implements Gpio.
Definition at line 63 of file PersistentGPIO.hxx.
|
inlinevirtual |
Sets the GPIO direction.
| dir | INPUT or OUTPUT |
Implements Gpio.
Definition at line 80 of file PersistentGPIO.hxx.
|
inlinevirtual |
Writes a GPIO output pin (set or clear to a specific state).
| new_state | the desired output state. See Value. |
Implements Gpio.
Definition at line 57 of file PersistentGPIO.hxx.
|
private |
Implementation of the gpio object.
Definition at line 97 of file PersistentGPIO.hxx.
|
private |
Implementation of the gpio object.
Definition at line 95 of file PersistentGPIO.hxx.