RF24Mesh - Automated Networking for nrf24L01 & nrf52x radios v2.0.1
2024 - A user friendly mesh overlay for sensor neworks using RF24Network
Loading...
Searching...
No Matches
RF24Mesh_config.h
Go to the documentation of this file.
1
7#ifndef __RF24MESH_CONFIG_H__
8#define __RF24MESH_CONFIG_H__
9
10/*** User Configuration ***/
16#ifndef MESH_MAX_CHILDREN
17 #define MESH_MAX_CHILDREN 4
18#endif // MESH_MAX_CHILDREN
19#if defined(RF24_TINY)
20 #define MESH_NOMASTER
21#endif
22
23// un-comment for non-master nodes not running on ATTiny MCUs
24//#define MESH_NOMASTER
25
26/***Advanced User Config***/
32#ifndef MESH_DEFAULT_CHANNEL
33 #define MESH_DEFAULT_CHANNEL 97
34#endif // MESH_DEFAULT_CHANNEL
35
40#ifndef MESH_RENEWAL_TIMEOUT
41 #define MESH_RENEWAL_TIMEOUT 7500
42#endif // MESH_RENEWAL_TIMEOUT
43
53#ifndef MESH_MEM_ALLOC_SIZE
54 #define MESH_MEM_ALLOC_SIZE 10
55#endif // MESH_MEM_ALLOC_SIZE
56
63#ifndef MESH_CONNECTION_CHECK_ATTEMPTS
64 #define MESH_CONNECTION_CHECK_ATTEMPTS 3
65#endif
66
67/**************************/
68/*** Debug ***/
69//#define RF24MESH_DEBUG_MINIMAL /** Uncomment for the Master Node to print out address assignments as they are assigned */
70//#define RF24MESH_DEBUG /** Uncomment to enable debug output to serial **/
71/**************************/
72
73/*** Other Configuration ***/
74//#define MESH_MIN_SAVE_TIME 30000 /** UNUSED Minimum time required before changing nodeID. Prevents excessive writing to EEPROM */
75
83#ifndef MESH_LOOKUP_TIMEOUT
84 #define MESH_LOOKUP_TIMEOUT 135
85#endif // MESH_LOOKUP_TIMEOUT
86
88#ifndef MESH_WRITE_TIMEOUT
89 #define MESH_WRITE_TIMEOUT 115
90#endif // MESH_WRITE_TIMEOUT
91
92#ifndef MESH_DEFAULT_ADDRESS
93 #define MESH_DEFAULT_ADDRESS NETWORK_DEFAULT_ADDRESS
94#endif // MESH_DEFAULT_ADDRESS
95
96#define MESH_MULTICAST_ADDRESS NETWORK_MULTICAST_ADDRESS
97
98//#define MESH_MAX_ADDRESSES 255 /* UNUSED Determines the max size of the array used for storing addresses on the Master Node */
99//#define MESH_ADDRESS_HOLD_TIME 30000 /* UNUSED How long before a released address becomes available */
100
101#if (defined(__linux) || defined(linux)) && !defined(__ARDUINO_X86__) && !defined(USE_RF24_LIB_SRC)
102 #include <RF24/RF24_config.h>
103
104//ATXMega
105#elif defined(XMEGA)
106 #include "../../rf24lib/rf24lib/RF24_config.h"
107#else
108 #include <RF24_config.h>
109#endif
110
111#if defined(RF24MESH_DEBUG_MINIMAL)
112 #define IF_RF24MESH_DEBUG_MINIMAL(x) ({ x; })
113#else
114 #define IF_RF24MESH_DEBUG_MINIMAL(x)
115#endif
116
117#if defined(RF24MESH_DEBUG)
118 #define IF_RF24MESH_DEBUG(x) ({ x; })
119#else
120 #define IF_RF24MESH_DEBUG(x)
121#endif
122
123#endif // __RF24MESH_CONFIG_H__