add: choose initial relay mode
This commit is contained in:
parent
5e05d603c1
commit
d7c274ca86
11 changed files with 57 additions and 27 deletions
|
@ -11,6 +11,7 @@ typedef struct
|
|||
{
|
||||
uint8_t pin;
|
||||
int inverted;
|
||||
int init;
|
||||
relay_driver_t driver;
|
||||
uint8_t pulse_duration;
|
||||
} config_relay_t;
|
||||
|
@ -32,6 +33,7 @@ typedef struct
|
|||
uint16_t mqtt_port;
|
||||
char mqtt_host[256];
|
||||
uint8_t relay_count;
|
||||
int relays_init;
|
||||
config_relay_t *relay_configs;
|
||||
} config_t;
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#ifndef CORE_LOGGER_H
|
||||
#define CORE_LOGGER_H
|
||||
#ifndef EMGAUWA_LOGGER_H
|
||||
#define EMGAUWA_LOGGER_H
|
||||
|
||||
#include <stdio.h>
|
||||
#include <time.h>
|
||||
|
@ -19,4 +19,4 @@ logger_log(int level, const char *filename, int line, const char *func, const ch
|
|||
#define LOGGER_CRIT(...) logger_log(LOG_CRIT , __FILE__, __LINE__, __func__, ##__VA_ARGS__)
|
||||
#define LOGGER_EMERG(...) logger_log(LOG_EMERG , __FILE__, __LINE__, __func__, ##__VA_ARGS__)
|
||||
|
||||
#endif //CORE_LOGGER_H
|
||||
#endif //EMGAUWA_LOGGER_H
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue