controller-legacy/include/config.h

26 lines
417 B
C
Raw Normal View History

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
{
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