Benjamin Hepp / Mbed 2 deprecated AIT_UWB_Tracker

Dependencies:   DW1000 ait_link BufferedSerial mbed

Revision:
5:1928eb8c417a
Parent:
4:1a2c1e5e5516
Child:
10:6e95128c2efa
diff -r 1a2c1e5e5516 -r 1928eb8c417a main_slave.cpp
--- a/main_slave.cpp	Tue Mar 29 10:00:43 2016 +0000
+++ b/main_slave.cpp	Thu Mar 31 15:39:52 2016 +0000
@@ -12,7 +12,7 @@
 
 using ait::UWBSlave;
 
-const int SPI_FREQUENCY = 1000000;
+const int SPI_FREQUENCY = 5000000;
 
 const int SLAVE_ADDRESS = 20;
 
@@ -39,7 +39,7 @@
     Timer timer;
     timer.start();
 
-    InterruptIn irq(DW_IRQ_PIN);
+    InterruptIn* irq = new InterruptIn(DW_IRQ_PIN);
 
     pc.printf("Performing hardware reset of UWB modules\r\n");
     // == IMPORTANT == Create all DW objects first (this will cause a reset of the DW module)
@@ -47,7 +47,7 @@
 
     // Initialize the DW module
     DW1000 dw(spi, irq, DW_CS_PIN);
-    dw.setEUI(0xFAEDCD01FAEDCD01);                                  // basic methods called to check if we have a working SPI connection
+    dw.setEUI(0xFAEDCD01FAEDCD01 + SLAVE_ADDRESS);                  // basic methods called to check if we have a working SPI connection
     pc.printf("\r\nDecaWave 1.0   up and running!\r\n");            // Splashscreen
     pc.printf("DEVICE_ID register: 0x%X\r\n", dw.getDeviceID());
     pc.printf("EUI register: %016llX\r\n", dw.getEUI());
@@ -73,6 +73,7 @@
         wait_ms(500);
     }
 
+    //delete irq;
     //return 0;
 }
 #endif