DW1000 UWB driver based on work of Matthias Grob & Manuel Stalder - ETH Zürich - 2015
Revision 2:ebbb05cbc417, committed 2016-04-05
- Comitter:
- AndyA
- Date:
- Tue Apr 05 10:53:36 2016 +0000
- Parent:
- 0:bddb8cd5e7df
- Child:
- 5:68ffaa5962d1
- Commit message:
- a
Changed in this revision
DW1000.cpp | Show annotated file Show diff for this revision Revisions of this file |
DW1000.h | Show annotated file Show diff for this revision Revisions of this file |
--- a/DW1000.cpp Tue Apr 05 10:51:00 2016 +0000 +++ b/DW1000.cpp Tue Apr 05 10:53:36 2016 +0000 @@ -341,11 +341,6 @@ } uint32_t DW1000::readOTP (uint16_t word_address, uint8_t size) { - if (size == 1) - return readOTP8(word_address); - else if (size == 2) - return readOTP16(word_address); - else return readOTP32(word_address); } @@ -360,15 +355,6 @@ return data; } -uint8_t DW1000::readOTP8(uint16_t address) -{ - writeRegister16(DW1000_OTP_IF,DWOTP_OTP_ADDR,address); // write address - writeRegister8(DW1000_OTP_IF,DWOTP_OTP_CTRL,0x03); // read address load - writeRegister8(DW1000_OTP_IF,DWOTP_OTP_CTRL,0x01); // read - uint8_t data = readRegister8(DW1000_OTP_IF,DWOTP_OTP_RDAT); - writeRegister8(DW1000_OTP_IF,DWOTP_OTP_CTRL,0x00); // OTP idle - return data; -} void DW1000::setInterrupt(bool RX, bool TX) {
--- a/DW1000.h Tue Apr 05 10:51:00 2016 +0000 +++ b/DW1000.h Tue Apr 05 10:53:36 2016 +0000 @@ -219,10 +219,7 @@ // OTP - uint8_t readOTP8(uint16_t address); uint32_t readOTP32(uint16_t address); - uint64_t readOTP64(uint16_t address); - uint64_t readOTP40(uint16_t address); // SPI Inteface SPI spi; // SPI Bus