#include "distortos/chip/ChipInputPin.hpp"
ChipInputPin class is a single input pin of GPIOv2 in STM32
◆ ChipInputPin()
distortos::chip::ChipInputPin::ChipInputPin |
( |
Pin |
pin, |
|
|
PinPull |
pull = {} , |
|
|
bool |
inverted = {} |
|
) |
| |
|
explicit |
ChipInputPin's constructor.
- Parameters
-
[in] | pin | is the identifier of pin |
[in] | pull | is the desired pull-up/pull-down configuration of pin, default - PinPull::none |
[in] | inverted | selects whether the pin is inverted (true) - get() returns true when GPIO state is low and false when GPIO state is high - or not (false), default - false, not inverted |
◆ get()
bool distortos::chip::ChipInputPin::get |
( |
| ) |
const |
|
overridevirtual |
◆ getInvertedMode()
bool distortos::chip::ChipInputPin::getInvertedMode |
( |
| ) |
const |
|
inlineprotected |
- Returns
- true if inverted mode is enabled, false otherwise
◆ setInvertedMode()
void distortos::chip::ChipInputPin::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::ChipInputPin::inverted_ |
|
private |
selects whether the pin is inverted (true) or not (false)
◆ pin_
Pin distortos::chip::ChipInputPin::pin_ |
|
private |
The documentation for this class was generated from the following files: