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

19
include/helper.h Normal file
View File

@ -0,0 +1,19 @@
#ifndef __HELPER_H
#define __HELPER_H
#include "mgos.h"
#include <ctype.h>
#include <fnmatch.h>
#define MIN_GPIO 0
#define MAX_GPIO 16
#define MQTT_TOPIC_PREFIX ""
#define MQTT_TOPIC_BROADCAST_CMD "/mongoose/broadcast"
#define MQTT_TOPIC_BROADCAST_STAT "/mongoose/broadcast/stat"
#define ERR_GPIO_INVALID 255
bool is_button_flag_valid(const char *flag);
bool is_relay_flag_valid(const char *flag);
#endif // __HELPER_H