2020-01-07 01:23:16 +00:00
|
|
|
#ifndef CONTROLLER_CONFIG_H
|
|
|
|
#define CONTROLLER_CONFIG_H
|
|
|
|
|
2020-04-16 23:38:25 +00:00
|
|
|
#include <stdint.h>
|
2020-02-08 12:50:54 +00:00
|
|
|
|
2020-04-16 23:38:25 +00:00
|
|
|
#include <constants.h>
|
|
|
|
#include <enums.h>
|
2020-01-07 01:23:16 +00:00
|
|
|
|
2020-04-16 23:38:25 +00:00
|
|
|
typedef struct
|
|
|
|
{
|
|
|
|
uint8_t pin;
|
|
|
|
relay_driver_t driver;
|
|
|
|
} config_relay_t;
|
2020-01-07 01:23:16 +00:00
|
|
|
|
2020-04-16 23:38:25 +00:00
|
|
|
typedef struct
|
|
|
|
{
|
2020-04-17 23:24:36 +00:00
|
|
|
char *file;
|
|
|
|
run_type_t run_type;
|
2020-04-16 23:38:25 +00:00
|
|
|
char name[MAX_NAME_LENGTH + 1];
|
|
|
|
uint16_t discovery_port;
|
|
|
|
uint8_t relay_count;
|
|
|
|
config_relay_t *relay_configs;
|
|
|
|
} config_t;
|
2020-02-23 00:13:27 +00:00
|
|
|
|
2020-04-16 23:38:25 +00:00
|
|
|
extern config_t global_config;
|
2020-02-08 12:50:54 +00:00
|
|
|
|
2020-01-07 01:23:16 +00:00
|
|
|
#endif //CONTROLLER_CONFIG_H
|