DW1000 UWB driver based on work of Matthias Grob & Manuel Stalder - ETH Zürich - 2015
Revision 17:1fb08dfef237, committed 2017-11-08
- Comitter:
- AndyA
- Date:
- Wed Nov 08 11:15:47 2017 +0000
- Parent:
- 15:6faab70a5b19
- Child:
- 18:6c2ce1749d4a
- Commit message:
- Moved applySetup() to public, removed unnecessary include
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 Wed Nov 08 10:43:03 2017 +0000 +++ b/DW1000.cpp Wed Nov 08 11:15:47 2017 +0000 @@ -1,5 +1,4 @@ #include "DW1000.h" -#include "main.h" #define SPIRATE_PLL (10*1000*1000) #define SPIRATE_OSC (1*1000*1000) @@ -32,7 +31,7 @@ wait_ms(1); writeRegister32(DW1000_TX_POWER,0,0x1f1f1f1f); wait_ms(1); - uint32_t config = rangingSystem.readRegister32(DW1000_SYS_CFG,0); + uint32_t config = readRegister32(DW1000_SYS_CFG,0); config |= 1<<18; writeRegister32(DW1000_SYS_CFG,0,config); wait_ms(1);
--- a/DW1000.h Wed Nov 08 10:43:03 2017 +0000 +++ b/DW1000.h Wed Nov 08 11:15:47 2017 +0000 @@ -207,6 +207,15 @@ */ void enterRFTestMode(); + /** apply a new radio setup to the UWB system + * @param setup The new settings to use + * @return true if the setup was applied. + * + * The setup object supplied is copied and can be disposed of after the call. + * If the supplied setup fails DW1000Setup::check() then it is ignored and the function returns false. + * @note This will reset the radio. You must re-enable interupts, receiver etc. after calling it. + */ + bool applySetup(DW1000Setup *setup); protected: @@ -335,17 +344,6 @@ */ void setInterrupt(bool RX, bool TX); // set Interrupt for received a good frame (CRC ok) or transmission done - - /** apply a new radio setup to the UWB system - * @param setup The new settings to use - * @return true if the setup was applied. - * - * The setup object supplied is copied and can be disposed of after the call. - * If the supplied setup fails DW1000Setup::check() then it is ignored and the function returns false. - * @note This will reset the radio. You must re-enable interupts, receiver etc. after calling it. - */ - bool applySetup(DW1000Setup *setup); - /** Get the first path amplitude values * @param fp_amp2 Will be set to first path second peak amplitude