Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Diff: DW1000/DW1000.h
- Revision:
- 8:7a9c61242e2f
- Parent:
- 7:e634eeafc4d2
- Child:
- 10:d077bb12d259
diff -r e634eeafc4d2 -r 7a9c61242e2f DW1000/DW1000.h
--- a/DW1000/DW1000.h Tue Nov 18 14:06:48 2014 +0000
+++ b/DW1000/DW1000.h Tue Nov 18 15:41:33 2014 +0000
@@ -51,8 +51,7 @@
#define DW1000_SUBADDRESS_FLAG 0x40 // if we have a sub address second Bit has to be 1
#define DW1000_2_SUBADDRESS_FLAG 0x80 // if we have a long sub adress (more than 7 Bit) we set this Bit in the first part
-class DW1000
-{
+class DW1000 {
public:
DW1000(PinName MOSI, PinName MISO, PinName SCLK, PinName CS, PinName IRQ); // constructor, uses SPI class
@@ -63,6 +62,7 @@
float getVoltage();
void sendFrame(char* message, int length);
+ void receiveFrame();
//private:
// Interrupt
@@ -76,6 +76,8 @@
DigitalOut cs; // Slave selector for SPI-Bus (here explicitly needed to start and end SPI transactions also usable to wake up DW1000)
InterruptIn irq; // Pin used to handle Events from DW1000 by an Interrupthandler
+ void writeRegister8(uint8_t reg, uint16_t subaddress, uint8_t buffer); // expressive to write just one byte
+
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);
void setupTransaction(uint8_t reg, uint16_t subaddress, bool write); // writes bytes to SPI to setup a write or read transaction the register address and subaddress
