ESPMegaPRO-v3-SDK/Template Project/lib/ESPMegaPRO/DigitalInputIoT.hpp

15 lines
543 B
C++

#include <DigitalInputCard.hpp>
class DigitalInputIoT {
public:
bool begin(DigitalInputCard *card);
void handleMqttMessage(char *topic, char *payload);
void publishDigitalInputs();
void setDigitalInputsPublishEnabled(bool enabled);
void handleValueChange(uint8_t pin, uint8_t value);
void registerValueChangeCallback(void (*callback)(uint8_t, uint8_t));
private:
char *digital_inputs_topic;
bool digital_inputs_publish_enabled = false;
DigitalInputCard *card;
};