![]() |
SatNOGS-COMMS
4.1.0
A COMMS subsystem for CubeSats
|
#include <bsp.hpp>
Public Member Functions | |
| gpio_bsp (const struct gpio_dt_spec *io, bool output=true) | |
| 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 (lib::bsp::gpio::direction dir) |
| Set the direction of the GPIO. | |
| Public Member Functions inherited from satnogs::comms::lib::bsp::gpio | |
| gpio (direction dir=direction::INPUT) | |
| Construct a new GPIO object. | |
Additional Inherited Members | |
| Public Types inherited from satnogs::comms::lib::bsp::gpio | |
| enum class | direction : uint8_t { INPUT = 0 , OUTPUT = 1 } |
|
inline |
|
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.
Implements satnogs::comms::lib::bsp::gpio.
|
inlinevirtual |
Gets the physical level of the GPIO pin. For example, if the input level is 0V, this method will return false.
Implements satnogs::comms::lib::bsp::gpio.
|
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.
| s | the logical level of the output pin |
Implements satnogs::comms::lib::bsp::gpio.
|
inlinevirtual |
Set the direction of the GPIO.
| dir | the desired direction |
Implements satnogs::comms::lib::bsp::gpio.
|
inlinevirtual |
Sets the physical output of the pin.
Has no effect if the pin is not configured as output.
| s | the physical level of the output pin |
Implements satnogs::comms::lib::bsp::gpio.
|
inlinevirtual |
Toggles the GPIO pin if it is configured as output. Has no effect if it is conigured as input.
Implements satnogs::comms::lib::bsp::gpio.