A dummy GPIO implementation with no effect. Can be used for CI testing or default construction of gpio objects.
More...
#include <gpio.hpp>
|
| | dummy_gpio () |
| void | toggle () |
| | Toggles the GPIO pin if it is configured as output. Has no effect if it is conigured as input.
|
| bool | get () |
| | Gets the logical level of the GPIO pin. For example, if the pin has been configured as active low, and the input level is 0V, this method will return true.
|
| bool | get_raw () |
| | Gets the physical level of the GPIO pin. For example, if the input level is 0V, this method will return false.
|
| void | set (bool s) |
| | Sets the logical output of the pin. For example, if the pin has been configured as active low, setting s to true will set the output pin to 0V.
|
| void | set_raw (bool s) |
| | Sets the physical output of the pin.
|
| void | set_direction (direction dir) |
| | Set the direction of the GPIO.
|
| | gpio (direction dir=direction::INPUT) |
| | Construct a new GPIO object.
|
A dummy GPIO implementation with no effect. Can be used for CI testing or default construction of gpio objects.
Definition at line 118 of file gpio.hpp.
◆ dummy_gpio()
| satnogs::comms::lib::bsp::dummy_gpio::dummy_gpio |
( |
| ) |
|
|
inline |
◆ get()
| bool satnogs::comms::lib::bsp::dummy_gpio::get |
( |
| ) |
|
|
inlinevirtual |
Gets the logical level of the GPIO pin. For example, if the pin has been configured as active low, and the input level is 0V, this method will return true.
- Returns
- true if the logical level is 1
-
false if the logical level is 0
Implements satnogs::comms::lib::bsp::gpio.
Definition at line 130 of file gpio.hpp.
◆ get_raw()
| bool satnogs::comms::lib::bsp::dummy_gpio::get_raw |
( |
| ) |
|
|
inlinevirtual |
Gets the physical level of the GPIO pin. For example, if the input level is 0V, this method will return false.
- Returns
- true if the physical level is > 0V
-
false if the physical level is 0V
Implements satnogs::comms::lib::bsp::gpio.
Definition at line 136 of file gpio.hpp.
◆ set()
| void satnogs::comms::lib::bsp::dummy_gpio::set |
( |
bool | s | ) |
|
|
inlinevirtual |
Sets the logical output of the pin. For example, if the pin has been configured as active low, setting s to true will set the output pin to 0V.
Has no effect if the pin is not configured as output.
- Parameters
-
| s | the logical level of the output pin |
Implements satnogs::comms::lib::bsp::gpio.
Definition at line 142 of file gpio.hpp.
◆ set_direction()
| void satnogs::comms::lib::bsp::dummy_gpio::set_direction |
( |
direction | dir | ) |
|
|
inlinevirtual |
◆ set_raw()
| void satnogs::comms::lib::bsp::dummy_gpio::set_raw |
( |
bool | s | ) |
|
|
inlinevirtual |
Sets the physical output of the pin.
Has no effect if the pin is not configured as output.
- Parameters
-
| s | the physical level of the output pin |
Implements satnogs::comms::lib::bsp::gpio.
Definition at line 148 of file gpio.hpp.
◆ toggle()
| void satnogs::comms::lib::bsp::dummy_gpio::toggle |
( |
| ) |
|
|
inlinevirtual |
The documentation for this class was generated from the following file:
- libsatnogs-comms/include/satnogs-comms-lib/bsp/gpio.hpp