add digital output pinmap support
This commit is contained in:
parent
83ed233dd4
commit
2fd37fe66d
7 changed files with 63 additions and 30 deletions
|
@ -15,8 +15,8 @@ class DigitalOutputIoT : public IoTComponent {
|
|||
void publishDigitalOutputValue(uint8_t pin);
|
||||
void setDigitalOutputsPublishEnabled(bool enabled);
|
||||
void handleValueChange(uint8_t pin, bool state, uint16_t value);
|
||||
void registerValueChangeCallback(void (*callback)(uint8_t, bool, uint16_t));
|
||||
void deregisterValueChangeCallback();
|
||||
void registerChangeCallback(std::function<void(uint8_t, bool, uint16_t)> callback);
|
||||
void deregisterChangeCallback();
|
||||
void publishReport();
|
||||
void subscribe();
|
||||
void loop();
|
||||
|
@ -26,7 +26,7 @@ class DigitalOutputIoT : public IoTComponent {
|
|||
bool processSetStateMessage(char *topic, char *payload, uint8_t topic_length);
|
||||
bool processSetValueMessage(char *topic, char *payload, uint8_t topic_length);
|
||||
bool processRequestStateMessage(char *topic, char *payload, uint8_t topic_length);
|
||||
void (*value_change_callback)(uint8_t, bool, uint16_t);
|
||||
std::function<void(uint8_t, bool, uint16_t)> value_change_callback;
|
||||
DigitalOutputCard *card;
|
||||
char *state_report_topic;
|
||||
char *value_report_topic;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue