Open Model Railroad Network (OpenMRN)
Loading...
Searching...
No Matches
LoggingPinWithRead< message > Struct Template Reference

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

#include <LoggingGPIO.hxx>

Inheritance diagram for LoggingPinWithRead< message >:
LoggingPin< message >

Static Public Member Functions

static bool get ()
 Returns the input pin level.
 
static bool is_output ()
 Returns whether this is an output pin or not.
 
static constexpr const Gpioinstance ()
 
- Static Public Member Functions inherited from LoggingPin< message >
static void hw_init ()
 Empty. No initialization needed.
 
static void hw_set_to_safe ()
 Empty. No initialization needed.
 
static void set (bool value)
 Sets the output pin level (generating a log output).
 
static void toggle ()
 Toggles the output pin level.
 
static bool is_output ()
 Returns whether this is an output pin or not.
 

Additional Inherited Members

- Static Protected Attributes inherited from LoggingPin< message >
static bool lastValue_ = false
 Last output value.
 

Detailed Description

template<const char * message>
struct LoggingPinWithRead< message >

GPIO Pin definition structure with no actual pin behind it.

All writes to this pin will be logged to stdout. Reads will always return false.

Definition at line 85 of file LoggingGPIO.hxx.

Member Function Documentation

◆ get()

template<const char * message>
static bool LoggingPinWithRead< message >::get ( )
inlinestatic

Returns the input pin level.

Definition at line 88 of file LoggingGPIO.hxx.

◆ instance()

template<const char * message>
static constexpr const Gpio * LoggingPinWithRead< message >::instance ( )
inlinestaticconstexpr
Returns
the static Gpio instance object controlling this pin.

Definition at line 100 of file LoggingGPIO.hxx.

◆ is_output()

template<const char * message>
static bool LoggingPinWithRead< message >::is_output ( )
inlinestatic

Returns whether this is an output pin or not.

Definition at line 94 of file LoggingGPIO.hxx.


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