From fdaf171bfc8c9c9829987127b987613c8393a5ed Mon Sep 17 00:00:00 2001 From: TMRh20 Date: Fri, 16 Jan 2015 16:15:21 -0600 Subject: [PATCH] Update config file for RF24Ethernet - Modify RF24Network_config.h to allow inclusion by c programs (uIP) --- RF24Network_config.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/RF24Network_config.h b/RF24Network_config.h index a86010a3..c8c2333a 100644 --- a/RF24Network_config.h +++ b/RF24Network_config.h @@ -10,6 +10,8 @@ #ifndef __RF24NETWORK_CONFIG_H__ #define __RF24NETWORK_CONFIG_H__ +#ifdef __cplusplus + #if (defined (__linux) || defined (linux)) && !defined (__ARDUINO_X86__) #define RF24_LINUX #include @@ -28,6 +30,8 @@ #include +#endif //cplusplus: Allows RF24Ethernet(uIP) or other c programs to get access to the RF24Network config variables + #if !defined(__AVR_ATtiny85__) && !defined(__AVR_ATtiny84__) /********** USER CONFIG - non ATTiny **************/ @@ -79,6 +83,8 @@ #endif +#ifdef __cplusplus + #ifndef rf24_max #define rf24_max(a,b) (a>b?a:b) #endif @@ -192,3 +198,4 @@ #endif // __RF24_CONFIG_H__ // vim:ai:cin:sts=2 sw=2 ft=cpp +#endif //cplusplus \ No newline at end of file