IoT - Kubus / Mbed 2 deprecated Kubus

Dependencies:   mbed nRF24L01P

Branch:
multipipe
Revision:
51:090149c4aa28
Parent:
44:d15530b37144
Child:
54:2551a3c781cf
diff -r e83e38fece23 -r 090149c4aa28 common.h
--- a/common.h	Tue Jan 17 14:41:20 2017 +0100
+++ b/common.h	Wed Jan 18 16:57:05 2017 +0100
@@ -3,6 +3,7 @@
 
 #include <sstream>
 #include <stdint.h>
+#include <vector>
 #include <string>
 #include "nRF24L01P.h"
 #include "mbed.h"
@@ -12,11 +13,15 @@
 #define CHANNEL         2
 #define TRANSFER_SIZE   32
 
+// STUPID LEGACY, DON'T USE
 const unsigned long long MASTER_ADDRESS = 0xBACDFF00;
 const unsigned long long BOARD1_ADDRESS = 0xBACDFF01;
 const unsigned long long BOARD2_ADDRESS = 0xBACDFF02;
 const unsigned long long BOARD3_ADDRESS = 0xBACDFF03;
 
+extern const int pipes[];
+extern const unsigned long long addresses[];
+
 enum SENSOR_TYPE {
     PIR1 = 1,
     PIR2 = 2,
@@ -47,7 +52,7 @@
 
 std::string str_hex(const char* text, int len);
 
-void radio_init(nRF24L01P* radio, unsigned long long rx_address,
-        unsigned long long tx_address);
+void radio_init_sensor_board(nRF24L01P* radio, unsigned long long tx_address);
+void radio_init_master(nRF24L01P* radio, const std::vector<unsigned long long> &rx_addresses);
 
 #endif /* JNP3_COMMON */