Open Model Railroad Network (OpenMRN)
Loading...
Searching...
No Matches
DummyGPIO.hxx
Go to the documentation of this file.
1
35#ifndef _FREERTOS_DRIVERS_COMMON_DUMMYGPIO_HXX_
36#define _FREERTOS_DRIVERS_COMMON_DUMMYGPIO_HXX_
37
38#include "GpioWrapper.hxx"
39
43{
45 static void hw_init()
46 {
47 }
50 static void hw_set_to_safe()
51 {
52 }
54 static void set(bool value)
55 {
56 }
58 static void toggle()
59 {
60 }
62 static bool is_output()
63 {
64 return true;
65 }
67 static void set_hw()
68 {
69 }
71 static void set_output()
72 {
73 }
75 static void set_input()
76 {
77 }
78};
79
83{
85 static bool get()
86 {
87 return false;
88 }
89
91 static bool is_output()
92 {
93 return false;
94 }
95
97 static constexpr const Gpio *instance()
98 {
100 }
101};
102
106{
108 static bool get()
109 {
110 return true;
111 }
112
114 static bool is_output()
115 {
116 return false;
117 }
118
120 static constexpr const Gpio *instance()
121 {
123 }
124};
125
126#endif // _FREERTOS_DRIVERS_COMMON_DUMMYGPIO_HXX_
static constexpr const Gpio * instance()
OS-independent abstraction for GPIO.
Definition Gpio.hxx:43
GPIO Pin definition structure with no actual pin behind it.
static bool is_output()
static bool get()
static constexpr const Gpio * instance()
GPIO Pin definition structure with no actual pin behind it.
Definition DummyGPIO.hxx:83
static bool is_output()
Definition DummyGPIO.hxx:91
static constexpr const Gpio * instance()
Definition DummyGPIO.hxx:97
static bool get()
Definition DummyGPIO.hxx:85
GPIO Pin definition structure with no actual pin behind it.
Definition DummyGPIO.hxx:43
static void set_output()
Sets to "GPIO out" function.
Definition DummyGPIO.hxx:71
static void set(bool value)
Sets the output pin to a given level.
Definition DummyGPIO.hxx:54
static void hw_set_to_safe()
Resets the hardware to a mode that is safe when there is no software running.
Definition DummyGPIO.hxx:50
static void set_hw()
Sets to "hardware" function.
Definition DummyGPIO.hxx:67
static void toggle()
Toggles the output pin level.
Definition DummyGPIO.hxx:58
static void hw_init()
Initializes the hardware to the required settings.
Definition DummyGPIO.hxx:45
static bool is_output()
Returns whether this is an output pin or not.
Definition DummyGPIO.hxx:62
static void set_input()
Sets to "GPIO in" function.
Definition DummyGPIO.hxx:75