10#ifndef SEMF_INPUT_DIGITALIN_DEBOUNCEDDIGITALINPOLLING_H_
11#define SEMF_INPUT_DIGITALIN_DEBOUNCEDDIGITALINPOLLING_H_
72 uint32_t m_debounceLowTime;
74 uint32_t m_debounceHighTime;
76 uint32_t m_lowTime = 0;
78 uint32_t m_highTime = 0;
Class for reading and debouncing a digital input (e.g. used for buttons or relays inputs)....
void tick() override
Checks the present pin state and counts the debounce time.
void setDebounceHighTime(uint32_t time)
Sets the debounce time for switching from low to high.
virtual ~DebouncedDigitalInPolling()=default
void setDebounceLowTime(uint32_t time)
Sets the debounce time for switching from high to low.
DebouncedDigitalInPolling(Gpio &gpio, uint32_t debounceLowTime, uint32_t debounceHighTime, bool inverted=false)
Constructor.
DebouncedDigitalInPolling(const DebouncedDigitalInPolling &other)=delete
Gpio & gpio() const
Returns the pointer to the GPIO to check the status from.
Class for reading a digital input in polling mode.
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...