DW1000 UWB driver based on work of Matthias Grob & Manuel Stalder - ETH Zürich - 2015
Diff: DW1000.cpp
- Revision:
- 2:ebbb05cbc417
- Parent:
- 0:bddb8cd5e7df
- Child:
- 5:68ffaa5962d1
diff -r bddb8cd5e7df -r ebbb05cbc417 DW1000.cpp --- 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) {