Added configuration to config.h, splitted master code from main.

This commit is contained in:
Dirk Jahnke
2018-10-19 23:48:54 +02:00
parent 3b107cd653
commit d67b0f672a
5 changed files with 122 additions and 75 deletions

22
src/config.h Normal file
View File

@@ -0,0 +1,22 @@
#ifndef config_h_included
#define config_h_included
#define PIN_MASTER_CLIENT_SELECT 2
#define ROLE_MASTER LOW
#define ROLE_CLIENT HIGH
#define PIN_NRF24_CE 10
#define PIN_NRF24_CSN 8
#define PIN_RELAY1 5
#define PIN_RELAY2 6
// communication protocol definitions
#define nRF_Channel 1
#define THIS_ADRESS 0 // uint8_t address of this node
// relay based clock control behaviour
#define DEFAULT_HOLD_RELAY_MS 150
#define DEFAULT_MIN_RELAY_OFF_TIME_MS 80
#define DEFAULT_RELAY_ACTIVE_LOW true
#endif