#include "distortos/chip/ChipOutputPin.hpp"
ChipOutputPin class is a single output pin of GPIOv2 in STM32
◆ ChipOutputPin()
distortos::chip::ChipOutputPin::ChipOutputPin |
( |
Pin |
pin, |
|
|
bool |
openDrain = {} , |
|
|
PinOutputSpeed |
outputSpeed = {} , |
|
|
PinPull |
pull = {} , |
|
|
bool |
initialState = {} , |
|
|
bool |
inverted = {} |
|
) |
| |
|
explicit |
ChipOutputPin's constructor.
- Parameters
-
[in] | pin | is the identifier of pin |
[in] | openDrain | is the desired output type of pin: push-pull (false) or open-drain (true), default - push-pull (false) |
[in] | outputSpeed | is the desired output speed of pin, default - PinOutputSpeed::low |
[in] | pull | is the desired pull-up/pull-down configuration of pin, default - PinPull::none |
[in] | initialState | is the initial state of pin, default - false |
[in] | inverted | selects whether the pin is inverted (true) - get() returns true when GPIO state is low and false when GPIO state is high, set() sets GPIO state to low when argument is true and to high when argument is false - or not (false), default - false, not inverted |
◆ get()
bool distortos::chip::ChipOutputPin::get |
( |
| ) |
const |
|
overridevirtual |
◆ getInvertedMode()
bool distortos::chip::ChipOutputPin::getInvertedMode |
( |
| ) |
const |
|
inlineprotected |
- Returns
- true if inverted mode is enabled, false otherwise
◆ set()
void distortos::chip::ChipOutputPin::set |
( |
bool |
state | ) |
|
|
overridevirtual |
◆ setInvertedMode()
void distortos::chip::ChipOutputPin::setInvertedMode |
( |
const bool |
inverted | ) |
|
|
inlineprotected |
Enables or disables inverted mode.
- Parameters
-
[in] | inverted | selects whether the pin is inverted (true) or not (false) |
◆ inverted_
bool distortos::chip::ChipOutputPin::inverted_ |
|
private |
selects whether the pin is inverted (true) or not (false)
◆ pin_
Pin distortos::chip::ChipOutputPin::pin_ |
|
private |
The documentation for this class was generated from the following files: