Add lightswitch to this firmware

This commit is contained in:
Pim van Pelt
2017-12-20 17:04:51 +01:00
parent 7ba19c8372
commit 1cbd2130db
24 changed files with 749 additions and 13 deletions

17
unittest/mgos_mqtt.h Normal file
View File

@ -0,0 +1,17 @@
#ifndef __MGOS_MQTT_H
#define __MGOS_MQTT_H
#include "mgos.h"
struct mg_connection;
typedef void (*sub_handler_t)(struct mg_connection *nc, const char *topic,
int topic_len, const char *msg, int msg_len,
void *ud);
void mgos_mqtt_pub(char *t, char *m, int m_len, int flags, bool persist);
void mgos_mqtt_sub(char *t, sub_handler_t cb, void *ud);
void mgos_mqtt_inject(char *topic, char *msg);
#endif // __MGOS_MQTT_H