![]() |
semf
|
Interface class for using a GPIO pin of the microcontroller. More...
#include <gpio.h>
Public Types | |
enum | Direction { Input = 0 , OutputPushpull , OutputOpendrain } |
enum | PullUpPullDown { NoPullupPulldown = 0 , Pullup , Pulldown } |
Public Member Functions | |
virtual | ~Gpio ()=default |
virtual void | set ()=0 |
virtual void | reset ()=0 |
virtual bool | state () const =0 |
Returns the current state of the pin. More... | |
virtual Direction | direction () const =0 |
Returns the direction setting of a GPIO. More... | |
virtual void | setDirection (Direction direction)=0 |
Sets the direction of a GPIO. More... | |
virtual PullUpPullDown | pullUpPullDown () const =0 |
Returns the pullup or pulldown setting of a GPIO. More... | |
virtual void | setPullUpPullDown (PullUpPullDown pullUpPullDown)=0 |
Sets the pullup or pulldown setting of a GPIO. More... | |
Public Attributes | |
Signal< Error > | error |
|
virtualdefault |
|
pure virtual |
|
pure virtual |
Returns the pullup or pulldown setting of a GPIO.
NoPullupPulldown
, Pullup
or Pulldown. Implemented in semf::Stm32Gpio.
|
pure virtual |
Sets the output to a low level.
Implemented in semf::Stm32Gpio.
|
pure virtual |
Sets the output to a high level.
Implemented in semf::Stm32Gpio.
|
pure virtual |
Sets the direction of a GPIO.
direction | direction to set. |
Implemented in semf::Stm32Gpio.
|
pure virtual |
Sets the pullup or pulldown setting of a GPIO.
pullUpPullDown | pullup/pulldown for setting up. |
Implemented in semf::Stm32Gpio.
|
pure virtual |
Returns the current state of the pin.
true
for high level, false
for low level. Implemented in semf::Stm32Gpio.