31 if (
state() == app::DigitalIn::State::Low && newState == app::DigitalIn::State::High)
37 else if (
state() == State::High && newState == app::DigitalIn::State::Low)
39 setState(app::DigitalIn::State::Low);
52 SEMF_INFO(
"set state to %s",
state == State::High ?
"high" :
"low");
Base class for having access to the level state of a digital input.
State state() const override
Returns the level status of the hardware pin.
State state() const override
Returns the level status of the hardware pin.
void setState(State state)
Sets the hardware pin status internally.
DigitalInPolling(Gpio &gpio, bool inverted=false)
Constructor.
Interface class for using a GPIO pin of the microcontroller.
A TimeBase is the bridge between e.g. a hardware timer (interrupt service routine) and TickReceiver o...
virtual void add(TickReceiver &tickReceiver)=0
Adds e.g. a timer to this timebase.