Open Model Railroad Network (OpenMRN)
Loading...
Searching...
No Matches
DummyPin Struct Reference

GPIO Pin definition structure with no actual pin behind it. More...

#include <DummyGPIO.hxx>

Inheritance diagram for DummyPin:
DummyPinWithRead DummyPinWithReadHigh

Static Public Member Functions

static void hw_init ()
 Initializes the hardware to the required settings.
 
static void hw_set_to_safe ()
 Resets the hardware to a mode that is safe when there is no software running.
 
static void set (bool value)
 Sets the output pin to a given level.
 
static void toggle ()
 Toggles the output pin level.
 
static bool is_output ()
 Returns whether this is an output pin or not.
 
static void set_hw ()
 Sets to "hardware" function.
 
static void set_output ()
 Sets to "GPIO out" function.
 
static void set_input ()
 Sets to "GPIO in" function.
 

Detailed Description

GPIO Pin definition structure with no actual pin behind it.

All writes to this pin will be silently ignored. Reads from this pin will not compile.

Definition at line 42 of file DummyGPIO.hxx.

Member Function Documentation

◆ hw_init()

static void DummyPin::hw_init ( )
inlinestatic

Initializes the hardware to the required settings.

Definition at line 45 of file DummyGPIO.hxx.

◆ hw_set_to_safe()

static void DummyPin::hw_set_to_safe ( )
inlinestatic

Resets the hardware to a mode that is safe when there is no software running.

This uaully means turning off outputs that consume power.

Definition at line 50 of file DummyGPIO.hxx.

◆ is_output()

static bool DummyPin::is_output ( )
inlinestatic

Returns whether this is an output pin or not.

Definition at line 62 of file DummyGPIO.hxx.

◆ set()

static void DummyPin::set ( bool  value)
inlinestatic

Sets the output pin to a given level.

Definition at line 54 of file DummyGPIO.hxx.

◆ set_hw()

static void DummyPin::set_hw ( )
inlinestatic

Sets to "hardware" function.

Definition at line 67 of file DummyGPIO.hxx.

◆ set_input()

static void DummyPin::set_input ( )
inlinestatic

Sets to "GPIO in" function.

Definition at line 75 of file DummyGPIO.hxx.

◆ set_output()

static void DummyPin::set_output ( )
inlinestatic

Sets to "GPIO out" function.

Definition at line 71 of file DummyGPIO.hxx.

◆ toggle()

static void DummyPin::toggle ( )
inlinestatic

Toggles the output pin level.

Definition at line 58 of file DummyGPIO.hxx.


The documentation for this struct was generated from the following file: