File Switch3Pos.h
File List > Firmware > Libraries > PanelGroup > Inputs > Switch3Pos > Switch3Pos.h
Go to the documentation of this file
#pragma once
#ifdef ARDUINO_ARCH_STM32
#include <PanelGroup.h> // PinRef
#include <Inputs/MultiPosInput/MultiPosInput.h> // MultiPosInput base
namespace OpenSkyhawk {
class Switch3Pos : public MultiPosInput {
public:
static constexpr uint16_t DEBOUNCE_MS = 20;
Switch3Pos(uint16_t controlId, PinRef pinA, PinRef pinB, bool reverse = false,
uint16_t debounceMs = DEBOUNCE_MS);
void configure() override;
protected:
uint16_t readRaw() override;
private:
PinRef _pinA;
PinRef _pinB;
bool _reverse;
};
} // namespace OpenSkyhawk
#endif // ARDUINO_ARCH_STM32