Tobi's ubw test branch

Dependencies:   mavlink_bridge mbed

Fork of AIT_UWB_Range by Benjamin Hepp

Revision:
18:bbc7ca7d3a95
Parent:
17:8afa5f9122da
Child:
20:257d56530ae1
--- a/DW1000/DW1000.h	Mon Nov 24 14:09:49 2014 +0000
+++ b/DW1000/DW1000.h	Mon Nov 24 16:48:03 2014 +0000
@@ -60,6 +60,7 @@
         uint64_t getEUI();                                                                      // gets 64 bit Extended Unique Identifier according to IEEE standard
         void setEUI(uint64_t EUI);                                                              // sets 64 bit Extended Unique Identifier according to IEEE standard
         float getVoltage();                                                                     // gets the current chip voltage measurement form the A/D converter
+        uint64_t getStatus();                                                                   // get the 40 bit device status
         
         void sendString(char* message);                                                         // to send String with arbitrary length
         char* receiveString();                                                                  // to receive char string with arbitrary length (ATTENTION! you have to delete the returned memory location like "client delete[] receivedMessage;")
@@ -77,15 +78,20 @@
 
         // Interrupt
         InterruptIn irq;                                                                        // Pin used to handle Events from DW1000 by an Interrupthandler
+        void (*callbackRX) (int framelength);                                                                  // function pointer to callback which is called when successfull RX took place
+        void (*callbackTX) ();                                                                  // function pointer to callback which is called when successfull TX took place
         void ISR();                                                                             // interrupt handling method (also calls according callback methods)
-        void (*callbackRX) ();                                                                  // pointer to callback which is called when successfull RX took place
+        uint16_t getFramelength();                                                              // to get the framelength of the received frame from the PHY header
         
         // SPI Inteface
         SPI spi;                                                                                // SPI Bus
         DigitalOut cs;                                                                          // Slave selector for SPI-Bus (here explicitly needed to start and end SPI transactions also usable to wake up DW1000)
         
-        uint8_t readRegister8(uint8_t reg, uint16_t subaddress);                                // expressive to read just one byte
-        void writeRegister8(uint8_t reg, uint16_t subaddress, uint8_t buffer);                  // expressive to write just one byte
+        uint8_t readRegister8(uint8_t reg, uint16_t subaddress);                                // expressive methods to read or write the number of bits written in the name
+        uint16_t readRegister16(uint8_t reg, uint16_t subaddress);
+        uint64_t readRegister40(uint8_t reg, uint16_t subaddress);
+        void writeRegister8(uint8_t reg, uint16_t subaddress, uint8_t buffer);
+        void writeRegister16(uint8_t reg, uint16_t subaddress, uint16_t buffer);
         
         void readRegister(uint8_t reg, uint16_t subaddress, uint8_t *buffer, int length);
         void writeRegister(uint8_t reg, uint16_t subaddress, uint8_t *buffer, int length);