Skip to content

File IntegerOutput.h

File List > Firmware > Libraries > PanelGroup > Outputs > IntegerOutput > IntegerOutput.h

Go to the documentation of this file

#pragma once
#ifdef ARDUINO_ARCH_STM32

#include <Outputs/AnalogOutput/AnalogOutput.h>  // family base

namespace OpenSkyhawk {

class IntegerOutput : public AnalogOutput {
public:
    using Callback = void (*)(uint16_t value);

    IntegerOutput(uint16_t controlId, Callback callback, uint16_t mask = 0xFFFF, uint8_t shift = 0);

protected:
    void apply(uint16_t value) override;

private:
    Callback _callback;
};

} // namespace OpenSkyhawk

#endif // ARDUINO_ARCH_STM32