#include <IGpio.hpp>
|
enum class | Direction { Input
, Output
} |
|
enum class | LogicMode { ActiveHigh
, ActiveLow
} |
|
enum class | PullMode { None
, PullUp
, PullDown
} |
|
enum class | InterruptMode {
Disable
, EdgeRising
, EdgeFalling
, EdgeBoth
,
LevelLow
, LevelHigh
, LevelToInactive
, LevelToActive
,
LevelInactive
, LevelActive
} |
|
◆ Direction
◆ InterruptMode
Enumerates the possible interrupt modes of a GPIO.
Enumerator |
---|
Disable | |
EdgeRising | |
EdgeFalling | |
EdgeBoth | |
LevelLow | |
LevelHigh | |
LevelToInactive | |
LevelToActive | |
LevelInactive | |
LevelActive | |
◆ LogicMode
Enumerates the possible logic modes of a GPIO.
- Active high means that true is equal to a high voltage, false is 0V.
- Active low means that true is equal to 0V, false is high voltage.
Enumerator |
---|
ActiveHigh | |
ActiveLow | |
◆ PullMode
Enumerator |
---|
None | |
PullUp | |
PullDown | |
◆ IGpio()
Create a new GPIO.
- Parameters
-
name | The name of the GPIO. Used for logging purposes. |
direction | The direction of the GPIO. |
logicMode | The logic mode of the GPIO. |
◆ ~IGpio()
◆ configureInterrupt()
◆ configurePinBasedOnSettings()
virtual void zct::IGpio::configurePinBasedOnSettings |
( |
| ) |
|
|
protectedpure virtual |
◆ get()
bool zct::IGpio::get |
( |
| ) |
const |
|
virtual |
Get the logical value of the GPIO.
Can be called on an output or input GPIO.
- Returns
- The logical value of the GPIO.
◆ getPhysical()
Get the physical value of the GPIO.
This ignores the logic mode of the GPIO and returns the physical value directly.
- Returns
- The physical value of the GPIO.
Implemented in zct::GpioMock, and zct::GpioReal.
◆ set()
◆ setDirection()
◆ setLogicMode()
Set the logic mode of the GPIO.
- Parameters
-
logicMode | The logic mode to set. |
Reimplemented in zct::GpioMock.
◆ setPhysical()
Set the physical value of the GPIO.
This ignores the logic mode of the GPIO and sets the physical value directly.
- Parameters
-
value | The physical value to set. |
Implemented in zct::GpioMock, and zct::GpioReal.
◆ setPullMode()
Set the pull mode of the GPIO.
- Parameters
-
pullMode | The pull mode to set. |
◆ m_direction
◆ m_interruptMode
◆ m_interruptUserCallback
std::function<void()> zct::IGpio::m_interruptUserCallback |
|
protected |
◆ m_logicMode
◆ m_name
◆ m_pullMode
The documentation for this class was generated from the following files:
- /home/runner/work/ZephyrCppToolkit/ZephyrCppToolkit/include/ZephyrCppToolkit/Peripherals/IGpio.hpp
- /home/runner/work/ZephyrCppToolkit/ZephyrCppToolkit/src/Peripherals/IGpio.cpp