Arduino driver library for Decawave DW1000

- Main Page
- Data Structures
- Files

- File List
- Globals

All Data Structures Files Functions Variables Macros
DW1000.h
Go to the documentation of this file.
1 /*
2 * Copyright (c) 2015 by Thomas Trojer <thomas@trojer.net>
3 * Decawave DW1000 library for arduino.
4 *
5 * Licensed under the Apache License, Version 2.0 (the "License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
8 *
9 * http://www.apache.org/licenses/LICENSE-2.0
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
16 *
17 * @file DW1000.h
18 * Arduino driver library (header file) for the Decawave DW1000 UWB transceiver IC.
19 */
20
21 #ifndef _DW1000_H_INCLUDED
22 #define _DW1000_H_INCLUDED
23
24 // Time resolution in micro-seconds of time based registers/values.
25 // Each bit in a timestamp counts for a period of approx. 15.65ps
26 #define TIME_RES 0.000015650040064103
27 #define TIME_RES_INV 63897.6
28
29 // time stamp byte length
30 #define LEN_STAMP 5
31
32 // enum to determine RX or TX mode of device
33 #define IDLE_MODE 0x00
34 #define RX_MODE 0x01
35 #define TX_MODE 0x02
36
37 // used for SPI ready w/o actual writes
38 #define JUNK 0x00
39
40 // no sub-address for register write
41 #define NO_SUB 0x00
42
43 // device id register
44 #define DEV_ID 0x00
45 #define LEN_DEV_ID 4
46
47 // extended unique identifier register
48 #define EUI 0x01
49 #define LEN_EUI 8
50
51 // PAN identifier, short address register
52 #define PANADR 0x03
53 #define LEN_PANADR 4
54
55 // device configuration register
56 #define SYS_CFG 0x04
57 #define LEN_SYS_CFG 4
58 #define FFEN_BIT 0
59 #define DIS_DRXB_BIT 12
60 #define DIS_STXP_BIT 18
61 #define HIRQ_POL_BIT 9
62 #define RXAUTR_BIT 29
63 #define PHR_MODE_SUB 16
64 #define LEN_PHR_MODE_SUB 2
65 #define RXM110K_BIT 22
66
67 // device control register
68 #define SYS_CTRL 0x0D
69 #define LEN_SYS_CTRL 4
70 #define SFCST_BIT 0
71 #define TXSTRT_BIT 1
72 #define TXDLYS_BIT 2
73 #define TRXOFF_BIT 6
74 #define WAIT4RESP_BIT 7
75 #define RXENAB_BIT 8
76 #define RXDLYS_BIT 9
77
78 // system event status register
79 #define SYS_STATUS 0x0F
80 #define LEN_SYS_STATUS 5
81 #define CPLOCK_BIT 1
82 #define AAT_BIT 3
83 #define TXFRB_BIT 4
84 #define TXPRS_BIT 5
85 #define TXPHS_BIT 6
86 #define TXFRS_BIT 7
87 #define LDEDONE_BIT 10
88 #define RXPHE_BIT 12
89 #define RXDFR_BIT 13
90 #define RXFCG_BIT 14
91 #define RXFCE_BIT 15
92 #define RXRFSL_BIT 16
93 #define RXRFTO_BIT 17
94 #define LDEERR_BIT 18
95 #define RFPLL_LL_BIT 24
96 #define CLKPLL_LL_BIT 25
97
98 // system event mask register
99 // NOTE: uses the bit definitions of SYS_STATUS (below 32)
100 #define SYS_MASK 0x0E
101 #define LEN_SYS_MASK 4
102
103 // system time counter
104 #define SYS_TIME 0x06
105 #define LEN_SYS_TIME LEN_STAMP
106
107 // RX timestamp register
108 #define RX_TIME 0x15
109 #define LEN_RX_TIME 14
110 #define RX_STAMP_SUB 0x00
111 #define FP_AMPL1_SUB 0x07
112 #define LEN_RX_STAMP LEN_STAMP
113 #define LEN_FP_AMPL1 2
114
115 // RX frame quality
116 #define RX_FQUAL 0x12
117 #define LEN_RX_FQUAL 8
118 #define FP_AMPL2_SUB 0x02
119 #define FP_AMPL3_SUB 0x04
120 #define LEN_FP_AMPL2 2
121 #define LEN_FP_AMPL3 2
122
123 // TX timestamp register
124 #define TX_TIME 0x17
125 #define LEN_TX_TIME 10
126 #define TX_STAMP_SUB 0
127 #define LEN_TX_STAMP LEN_STAMP
128
129 // timing register (for delayed RX/TX)
130 #define DX_TIME 0x0A
131 #define LEN_DX_TIME LEN_STAMP
132
133 // transmit data buffer
134 #define TX_BUFFER 0x09
135 #define LEN_TX_BUFFER 1024
136 #define LEN_UWB_FRAMES 127
137 #define LEN_EXT_UWB_FRAMES 1023
138
139 // RX frame info
140 #define RX_FINFO 0x10
141 #define LEN_RX_FINFO 4
142
143 // receive data buffer
144 #define RX_BUFFER 0x11
145 #define LEN_RX_BUFFER 1024
146
147 // transmit control
148 #define TX_FCTRL 0x08
149 #define LEN_TX_FCTRL 5
150
151 // channel control
152 #define CHAN_CTRL 0x1F
153 #define LEN_CHAN_CTRL 4
154 #define DWSFD_BIT 17
155
156 // OTP control (for LDE micro code loading only)
157 #define OTP_IF 0x2D
158 #define OTP_ADDR_SUB 0x04
159 #define OTP_CTRL_SUB 0x06
160 #define OTP_RDAT_SUB 0x0A
161 #define LEN_OTP_ADDR 2
162 #define LEN_OTP_CTRL 2
163 #define LEN_OTP_RDAT 4
164
165 // AGC_TUNE1/2 (for re-tuning only)
166 #define AGC_TUNE 0x23
167 #define AGC_TUNE1_SUB 0x04
168 #define AGC_TUNE2_SUB 0x0C
169 #define AGC_TUNE3_SUB 0x12
170 #define LEN_AGC_TUNE1 2
171 #define LEN_AGC_TUNE2 4
172 #define LEN_AGC_TUNE3 2
173
174 // DRX_TUNE2 (for re-tuning only)
175 #define DRX_TUNE 0x27
176 #define DRX_TUNE0b_SUB 0x02
177 #define DRX_TUNE1a_SUB 0x04
178 #define DRX_TUNE1b_SUB 0x06
179 #define DRX_TUNE2_SUB 0x08
180 #define DRX_TUNE4H_SUB 0x26
181 #define LEN_DRX_TUNE0b 2
182 #define LEN_DRX_TUNE1a 2
183 #define LEN_DRX_TUNE1b 2
184 #define LEN_DRX_TUNE2 4
185 #define LEN_DRX_TUNE4H 2
186
187 // LDE_CFG1 (for re-tuning only)
188 #define LDE_IF 0x2E
189 #define LDE_CFG1_SUB 0x0806
190 #define LDE_RXANTD_SUB 0x1804
191 #define LDE_CFG2_SUB 0x1806
192 #define LDE_REPC_SUB 0x2804
193 #define LEN_LDE_CFG1 1
194 #define LEN_LDE_CFG2 2
195 #define LEN_LDE_REPC 2
196 #define LEN_LDE_RXANTD 2
197
198 // TX_POWER (for re-tuning only)
199 #define TX_POWER 0x1E
200 #define LEN_TX_POWER 4
201
202 // RF_CONF (for re-tuning only)
203 #define RF_CONF 0x28
204 #define RF_RXCTRLH_SUB 0x0B
205 #define RF_TXCTRL_SUB 0x0C
206 #define LEN_RF_RXCTRLH 1
207 #define LEN_RF_TXCTRL 4
208
209 // TX_CAL (for re-tuning only)
210 #define TX_CAL 0x2A
211 #define TC_PGDELAY_SUB 0x0B
212 #define LEN_TC_PGDELAY 1
213
214 // FS_CTRL (for re-tuning only)
215 #define FS_CTRL 0x2B
216 #define FS_PLLCFG_SUB 0x07
217 #define FS_PLLTUNE_SUB 0x0B
218 #define LEN_FS_PLLCFG 4
219 #define LEN_FS_PLLTUNE 1
220
221 // PMSC
222 #define PMSC 0x36
223 #define PMSC_CTRL0_SUB 0x00
224 #define LEN_PMSC_CTRL0 4
225
226 // TX_ANTD Antenna delays
227 #define TX_ANTD 0x18
228 #define LEN_TX_ANTD 2
229
230 #include <stdio.h>
231 #include <stdlib.h>
232 #include <string.h>
233 #include <Arduino.h>
234 #include "DW1000Time.h"
235 #include "../SPI/SPI.h"
236
237 class DW1000Class {
238 public:
239 /* TODO impl: later
240 * - TXBOFFS in TX_FCTRL for offset buffer transmit
241 * - TR in TX_FCTRL for flagging for ranging messages
242 * - CANSFCS in SYS_CTRL to cancel frame check suppression
243 * - HSRBP in SYS_CTRL to determine in double buffered mode from which buffer to read
244 */
245
246 /* ##### Init ################################################################ */
253 static void begin(int irq, int rst);
254
261 static void begin(int irq);
262
271 static void select(int ss);
272
282 static void reselect(int ss);
283
288 static void end();
289
295 static void reset();
296
300 static void softReset();
301
302 /* ##### Print device id, address, etc. ###################################### */
310 static void getPrintableDeviceIdentifier(char msgBuffer[]);
311
318 static void getPrintableExtendedUniqueIdentifier(char msgBuffer[]);
319
327 static void getPrintableNetworkIdAndShortAddress(char msgBuffer[]);
328
336 static void getPrintableDeviceMode(char msgBuffer[]);
337
338 /* ##### Device address management, filters ################################## */
345 static void setNetworkId(unsigned int val);
346
353 static void setDeviceAddress(unsigned int val);
354 // TODO EUI, MAC and filters
355
356 /* ##### General device configuration ######################################## */
366 static void setReceiverAutoReenable(boolean val);
367
376 static void setInterruptPolarity(boolean val);
377
389 static void suppressFrameCheck(boolean val);
390
402 static void setDataRate(byte rate);
403
418 static void setPulseFrequency(byte freq);
419 static void setPreambleLength(byte prealen);
420 static void setChannel(byte channel);
421 static void setPreambleCode(byte preacode);
422
423 /* transmit and receive configuration. */
424 static DW1000Time setDelay(const DW1000Time& delay);
425 static void receivePermanently(boolean val);
426 static void setData(byte data[], unsigned int n);
427 static void setData(const String& data);
428 static void getData(byte data[], unsigned int n);
429 static void getData(String& data);
430 static unsigned int getDataLength();
431 static void getTransmitTimestamp(DW1000Time& time);
432 static void getReceiveTimestamp(DW1000Time& time);
433 static void getSystemTimestamp(DW1000Time& time);
434 static void getTransmitTimestamp(byte data[]);
435 static void getReceiveTimestamp(byte data[]);
436 static void getSystemTimestamp(byte data[]);
437
438 /* receive quality information. */
439 static float getReceivePower();
440 static float getFirstPathPower();
441 static float getNoiseValue();
442
443 /* interrupt management. */
444 static void interruptOnSent(boolean val);
445 static void interruptOnReceived(boolean val);
446 static void interruptOnReceiveFailed(boolean val);
447 static void interruptOnReceiveTimeout(boolean val);
448 static void interruptOnReceiveTimestampAvailable(boolean val);
449 static void interruptOnAutomaticAcknowledgeTrigger(boolean val);
450
451 /* callback handler management. */
452 static void attachErrorHandler(void (*handleError)(void)) {
453 _handleError = handleError;
454 }
455 static void attachSentHandler(void (*handleSent)(void)) {
456 _handleSent = handleSent;
457 }
458 static void attachReceivedHandler(void (*handleReceived)(void)) {
459 _handleReceived = handleReceived;
460 }
461 static void attachReceiveFailedHandler(void (*handleReceiveFailed)(void)) {
462 _handleReceiveFailed = handleReceiveFailed;
463 }
464 static void attachReceiveTimeoutHandler(void (*handleReceiveTimeout)(void)) {
465 _handleReceiveTimeout = handleReceiveTimeout;
466 }
467 static void attachReceiveTimestampAvailableHandler(
468 void (*handleReceiveTimestampAvailable)(void)) {
469 _handleReceiveTimestampAvailable = handleReceiveTimestampAvailable;
470 }
471
472 /* device state management. */
473 // idle state
474 static void idle();
475
476 // general configuration state
477 static void newConfiguration();
478 static void commitConfiguration();
479
480 // reception state
481 static void newReceive();
482 static void startReceive();
483
484 // transmission state
485 static void newTransmit();
486 static void startTransmit();
487
488 /* ##### Operation mode selection ############################################ */
510 static void enableMode(const byte mode[]);
511
512 // use RX/TX specific and general default settings
513 static void setDefaults();
514
515 /* debug pretty print registers. */
516 static void getPrettyBytes(byte cmd, word offset, char msgBuffer[], unsigned int n);
517 static void getPrettyBytes(byte data[], char msgBuffer[], unsigned int n);
518
519 // transmission/reception bit rate
520 static const byte TRX_RATE_110KBPS = 0x00;
521 static const byte TRX_RATE_850KBPS = 0x01;
522 static const byte TRX_RATE_6800KBPS = 0x02;
523
524 // transmission pulse frequency
525 // 0x00 is 4MHZ, but receiver in DW1000 does not support it (!??)
526 static const byte TX_PULSE_FREQ_16MHZ = 0x01;
527 static const byte TX_PULSE_FREQ_64MHZ = 0x02;
528
529 // preamble length (PE + TXPSR bits)
530 static const byte TX_PREAMBLE_LEN_64 = 0x01;
531 static const byte TX_PREAMBLE_LEN_128 = 0x05;
532 static const byte TX_PREAMBLE_LEN_256 = 0x09;
533 static const byte TX_PREAMBLE_LEN_512 = 0x0D;
534 static const byte TX_PREAMBLE_LEN_1024 = 0x02;
535 static const byte TX_PREAMBLE_LEN_1536 = 0x06;
536 static const byte TX_PREAMBLE_LEN_2048 = 0x0A;
537 static const byte TX_PREAMBLE_LEN_4096 = 0x03;
538
539 // PAC size. */
540 static const byte PAC_SIZE_8 = 8;
541 static const byte PAC_SIZE_16 = 16;
542 static const byte PAC_SIZE_32 = 32;
543 static const byte PAC_SIZE_64 = 64;
544
545 /* channel of operation. */
546 static const byte CHANNEL_1 = 1;
547 static const byte CHANNEL_2 = 2;
548 static const byte CHANNEL_3 = 3;
549 static const byte CHANNEL_4 = 4;
550 static const byte CHANNEL_5 = 5;
551 static const byte CHANNEL_7 = 7;
552
553 /* preamble codes. */
554 static const byte PREAMBLE_CODE_16MHZ_1 = 1;
555 static const byte PREAMBLE_CODE_16MHZ_2 = 2;
556 static const byte PREAMBLE_CODE_16MHZ_3 = 3;
557 static const byte PREAMBLE_CODE_16MHZ_4 = 4;
558 static const byte PREAMBLE_CODE_16MHZ_5 = 5;
559 static const byte PREAMBLE_CODE_16MHZ_6 = 6;
560 static const byte PREAMBLE_CODE_16MHZ_7 = 7;
561 static const byte PREAMBLE_CODE_16MHZ_8 = 8;
562 static const byte PREAMBLE_CODE_64MHZ_9 = 9;
563 static const byte PREAMBLE_CODE_64MHZ_10 = 10;
564 static const byte PREAMBLE_CODE_64MHZ_11 = 11;
565 static const byte PREAMBLE_CODE_64MHZ_12 = 12;
566 static const byte PREAMBLE_CODE_64MHZ_17 = 17;
567 static const byte PREAMBLE_CODE_64MHZ_18 = 18;
568 static const byte PREAMBLE_CODE_64MHZ_19 = 19;
569 static const byte PREAMBLE_CODE_64MHZ_20 = 20;
570
571 /* frame length settings. */
572 static const byte FRAME_LENGTH_NORMAL = 0x00;
573 static const byte FRAME_LENGTH_EXTENDED = 0x03;
574
575 /* pre-defined modes of operation (3 bytes for data rate, pulse frequency and
576 preamble length). */
577 static const byte MODE_LONGDATA_RANGE_LOWPOWER[];
578 static const byte MODE_SHORTDATA_FAST_LOWPOWER[];
579 static const byte MODE_LONGDATA_FAST_LOWPOWER[];
580 static const byte MODE_SHORTDATA_FAST_ACCURACY[];
581 static const byte MODE_LONGDATA_FAST_ACCURACY[];
582 static const byte MODE_LONGDATA_RANGE_ACCURACY[];
583
584 private:
585 /* chip select, reset and interrupt pins. */
586 static unsigned int _ss;
587 static unsigned int _rst;
588 static unsigned int _irq;
589
590 /* callbacks. */
591 static void (*_handleError)(void);
592 static void (*_handleSent)(void);
593 static void (*_handleReceived)(void);
594 static void (*_handleReceiveFailed)(void);
595 static void (*_handleReceiveTimeout)(void);
596 static void (*_handleReceiveTimestampAvailable)(void);
597
598 /* register caches. */
599 static byte _syscfg[LEN_SYS_CFG];
600 static byte _sysctrl[LEN_SYS_CTRL];
601 static byte _sysstatus[LEN_SYS_STATUS];
602 static byte _txfctrl[LEN_TX_FCTRL];
603 static byte _sysmask[LEN_SYS_MASK];
604 static byte _chanctrl[LEN_CHAN_CTRL];
605
606 /* PAN and short address. */
607 static byte _networkAndAddress[LEN_PANADR];
608
609 /* internal helper that guide tuning the chip. */
610 static byte _extendedFrameLength;
611 static byte _preambleCode;
612 static byte _channel;
613 static byte _preambleLength;
614 static byte _pulseFrequency;
615 static byte _dataRate;
616 static byte _pacSize;
617 static DW1000Time _antennaDelay;
618
619 /* internal helper to remember how to properly act. */
620 static boolean _permanentReceive;
621 static boolean _frameCheck;
622
623 // whether RX or TX is active
624 static int _deviceMode;
625
626 /* Arduino interrupt handler */
627 static void handleInterrupt();
628
629 /* not yet implemented/considered settings - hence private. */
630 // TODO implement MAC, addressing and auto-acknowledge
631 static void setFrameFilter(boolean val);
632 // note: not sure if going to be implemented for now
633 static void setDoubleBuffering(boolean val);
634 // TODO is implemented, but needs testing
635 static void useExtendedFrameLength(boolean val);
636 // TODO is implemented, but needs testing
637 static void waitForResponse(boolean val);
638
639 /* tuning according to mode. */
640 static void tune();
641
642 /* device status flags */
643 static boolean isReceiveTimestampAvailable();
644 static boolean isTransmitDone();
645 static boolean isReceiveDone();
646 static boolean isReceiveFailed();
647 static boolean isReceiveTimeout();
648 static boolean isClockProblem();
649
650 /* interrupt state handling */
651 static void clearInterrupts();
652 static void clearAllStatus();
653 static void clearReceiveStatus();
654 static void clearReceiveTimestampAvailableStatus();
655 static void clearTransmitStatus();
656
657 /* internal helper to read/write system registers. */
658 static void readSystemEventStatusRegister();
659 static void readSystemConfigurationRegister();
660 static void writeSystemConfigurationRegister();
661 static void readNetworkIdAndDeviceAddress();
662 static void writeNetworkIdAndDeviceAddress();
663 static void readSystemEventMaskRegister();
664 static void writeSystemEventMaskRegister();
665 static void readChannelControlRegister();
666 static void writeChannelControlRegister();
667 static void readTransmitFrameControlRegister();
668 static void writeTransmitFrameControlRegister();
669
670 /* clock management. */
671 static void enableClock(byte clock);
672
673 /* LDE micro-code management. */
674 static void loadLDE();
675
676 /* reading and writing bytes from and to DW1000 module. */
677 static void readBytes(byte cmd, word offset, byte data[], unsigned int n);
678 static void readBytesOTP(word address, byte data[]);
679 static void writeBytes(byte cmd, word offset, byte data[], unsigned int n);
680
681 /* writing numeric values to bytes. */
682 static void writeValueToBytes(byte data[], long val, unsigned int n);
683
684 /* internal helper for bit operations on multi-bytes. */
685 static boolean getBit(byte data[], unsigned int n, unsigned int bit);
686 static void setBit(byte data[], unsigned int n, unsigned int bit, boolean val);
687
688 /* Register is 6 bit, 7 = write, 6 = sub-adressing, 5-0 = register value
689 * Total header with sub-adressing can be 15 bit. */
690 static const byte WRITE = 0x80; // regular write
691 static const byte WRITE_SUB = 0xC0; // write with sub address
692 static const byte READ = 0x00; // regular read
693 static const byte READ_SUB = 0x40; // read with sub address
694
695 /* clocks available. */
696 static const byte AUTO_CLOCK = 0x00;
697 static const byte XTI_CLOCK = 0x01;
698 static const byte PLL_CLOCK = 0x02;
699
700 /* SPI configs. */
701 static const SPISettings _fastSPI;
702 static const SPISettings _slowSPI;
703 static const SPISettings* _currentSPI;
704 };
705
706 extern DW1000Class DW1000;
707
708 #endif
DW1000Class::CHANNEL_3
static const byte CHANNEL_3
Definition: DW1000.h:548
LEN_TX_FCTRL
#define LEN_TX_FCTRL
Definition: DW1000.h:149
DW1000Class::setDataRate
static void setDataRate(byte rate)
Definition: DW1000.cpp:862
DW1000Class::getPrintableNetworkIdAndShortAddress
static void getPrintableNetworkIdAndShortAddress(char msgBuffer[])
Definition: DW1000.cpp:607
DW1000Class::suppressFrameCheck
static void suppressFrameCheck(boolean val)
Definition: DW1000.cpp:836
DW1000Class::getNoiseValue
static float getNoiseValue()
Definition: DW1000.cpp:1137
DW1000Class::FRAME_LENGTH_EXTENDED
static const byte FRAME_LENGTH_EXTENDED
Definition: DW1000.h:573
DW1000Class::interruptOnReceiveFailed
static void interruptOnReceiveFailed(boolean val)
Definition: DW1000.cpp:741
DW1000Class::getSystemTimestamp
static void getSystemTimestamp(DW1000Time &time)
Definition: DW1000.cpp:1042
DW1000Class::MODE_SHORTDATA_FAST_ACCURACY
static const byte MODE_SHORTDATA_FAST_ACCURACY[]
Definition: DW1000.h:580
DW1000Class::PREAMBLE_CODE_16MHZ_1
static const byte PREAMBLE_CODE_16MHZ_1
Definition: DW1000.h:554
DW1000Class::newReceive
static void newReceive()
Definition: DW1000.cpp:771
DW1000Class::PREAMBLE_CODE_16MHZ_7
static const byte PREAMBLE_CODE_16MHZ_7
Definition: DW1000.h:560
DW1000Class::attachErrorHandler
static void attachErrorHandler(void(*handleError)(void))
Definition: DW1000.h:452
DW1000Class::PREAMBLE_CODE_16MHZ_2
static const byte PREAMBLE_CODE_16MHZ_2
Definition: DW1000.h:555
DW1000Class::begin
static void begin(int irq, int rst)
Definition: DW1000.cpp:123
DW1000Class::PREAMBLE_CODE_16MHZ_5
static const byte PREAMBLE_CODE_16MHZ_5
Definition: DW1000.h:558
DW1000Class::startReceive
static void startReceive()
Definition: DW1000.cpp:778
DW1000Class::getReceiveTimestamp
static void getReceiveTimestamp(DW1000Time &time)
Definition: DW1000.cpp:1036
DW1000Class::setPulseFrequency
static void setPulseFrequency(byte freq)
Definition: DW1000.cpp:887
DW1000Class::getPrintableDeviceIdentifier
static void getPrintableDeviceIdentifier(char msgBuffer[])
Definition: DW1000.cpp:593
DW1000Class::CHANNEL_7
static const byte CHANNEL_7
Definition: DW1000.h:551
DW1000Class::PREAMBLE_CODE_64MHZ_19
static const byte PREAMBLE_CODE_64MHZ_19
Definition: DW1000.h:568
DW1000Class::CHANNEL_2
static const byte CHANNEL_2
Definition: DW1000.h:547
DW1000Class::newConfiguration
static void newConfiguration()
Definition: DW1000.cpp:805
DW1000Class::getPrettyBytes
static void getPrettyBytes(byte cmd, word offset, char msgBuffer[], unsigned int n)
Definition: DW1000.cpp:1354
DW1000Class::PREAMBLE_CODE_64MHZ_11
static const byte PREAMBLE_CODE_64MHZ_11
Definition: DW1000.h:564
DW1000Class::PAC_SIZE_32
static const byte PAC_SIZE_32
Definition: DW1000.h:542
DW1000Class::getPrintableDeviceMode
static void getPrintableDeviceMode(char msgBuffer[])
Definition: DW1000.cpp:614
DW1000Class::interruptOnSent
static void interruptOnSent(boolean val)
Definition: DW1000.cpp:732
DW1000Class::TX_PULSE_FREQ_16MHZ
static const byte TX_PULSE_FREQ_16MHZ
Definition: DW1000.h:526
DW1000Class::receivePermanently
static void receivePermanently(boolean val)
Definition: DW1000.cpp:918
DW1000Class::setDelay
static DW1000Time setDelay(const DW1000Time &delay)
Definition: DW1000.cpp:840
DW1000Class::softReset
static void softReset()
Definition: DW1000.cpp:200
DW1000Class::setData
static void setData(byte data[], unsigned int n)
Definition: DW1000.cpp:963
DW1000Class::interruptOnReceiveTimestampAvailable
static void interruptOnReceiveTimestampAvailable(boolean val)
Definition: DW1000.cpp:752
DW1000Class::reset
static void reset()
Definition: DW1000.cpp:187
DW1000Class::PREAMBLE_CODE_64MHZ_12
static const byte PREAMBLE_CODE_64MHZ_12
Definition: DW1000.h:565
DW1000Class::TX_PREAMBLE_LEN_2048
static const byte TX_PREAMBLE_LEN_2048
Definition: DW1000.h:536
DW1000Class::TX_PREAMBLE_LEN_256
static const byte TX_PREAMBLE_LEN_256
Definition: DW1000.h:532
LEN_SYS_STATUS
#define LEN_SYS_STATUS
Definition: DW1000.h:80
DW1000Class::PREAMBLE_CODE_64MHZ_9
static const byte PREAMBLE_CODE_64MHZ_9
Definition: DW1000.h:562
DW1000Class::TX_PREAMBLE_LEN_512
static const byte TX_PREAMBLE_LEN_512
Definition: DW1000.h:533
DW1000Class::attachReceivedHandler
static void attachReceivedHandler(void(*handleReceived)(void))
Definition: DW1000.h:458
DW1000Class::PAC_SIZE_16
static const byte PAC_SIZE_16
Definition: DW1000.h:541
DW1000Class::attachReceiveFailedHandler
static void attachReceiveFailedHandler(void(*handleReceiveFailed)(void))
Definition: DW1000.h:461
DW1000Class::attachReceiveTimestampAvailableHandler
static void attachReceiveTimestampAvailableHandler(void(*handleReceiveTimestampAvailable)(void))
Definition: DW1000.h:467
DW1000Class::interruptOnReceived
static void interruptOnReceived(boolean val)
Definition: DW1000.cpp:736
DW1000Class::attachSentHandler
static void attachSentHandler(void(*handleSent)(void))
Definition: DW1000.h:455
DW1000Class::select
static void select(int ss)
Definition: DW1000.cpp:81
DW1000Class::CHANNEL_1
static const byte CHANNEL_1
Definition: DW1000.h:546
DW1000Class::getFirstPathPower
static float getFirstPathPower()
Definition: DW1000.cpp:1142
DW1000Class::setDeviceAddress
static void setDeviceAddress(unsigned int val)
Definition: DW1000.cpp:711
DW1000
DW1000Class DW1000
Definition: DW1000.cpp:24
DW1000Class::TX_PULSE_FREQ_64MHZ
static const byte TX_PULSE_FREQ_64MHZ
Definition: DW1000.h:527
LEN_SYS_CFG
#define LEN_SYS_CFG
Definition: DW1000.h:57
DW1000Class::PREAMBLE_CODE_16MHZ_4
static const byte PREAMBLE_CODE_16MHZ_4
Definition: DW1000.h:557
DW1000Class::commitConfiguration
static void commitConfiguration()
Definition: DW1000.cpp:814
DW1000Class::TX_PREAMBLE_LEN_4096
static const byte TX_PREAMBLE_LEN_4096
Definition: DW1000.h:537
DW1000Class::getPrintableExtendedUniqueIdentifier
static void getPrintableExtendedUniqueIdentifier(char msgBuffer[])
Definition: DW1000.cpp:600
DW1000Class::setChannel
static void setChannel(byte channel)
Definition: DW1000.cpp:927
DW1000Class::MODE_LONGDATA_FAST_LOWPOWER
static const byte MODE_LONGDATA_FAST_LOWPOWER[]
Definition: DW1000.h:579
DW1000Time
Definition: DW1000Time.h:38
DW1000Class::newTransmit
static void newTransmit()
Definition: DW1000.cpp:784
DW1000Class::getReceivePower
static float getReceivePower()
Definition: DW1000.cpp:1132
DW1000Class::FRAME_LENGTH_NORMAL
static const byte FRAME_LENGTH_NORMAL
Definition: DW1000.h:572
DW1000Class::PREAMBLE_CODE_16MHZ_8
static const byte PREAMBLE_CODE_16MHZ_8
Definition: DW1000.h:561
DW1000Class::PREAMBLE_CODE_64MHZ_10
static const byte PREAMBLE_CODE_64MHZ_10
Definition: DW1000.h:563
DW1000Class::TRX_RATE_110KBPS
static const byte TRX_RATE_110KBPS
Definition: DW1000.h:520
DW1000Class::attachReceiveTimeoutHandler
static void attachReceiveTimeoutHandler(void(*handleReceiveTimeout)(void))
Definition: DW1000.h:464
DW1000Class::interruptOnAutomaticAcknowledgeTrigger
static void interruptOnAutomaticAcknowledgeTrigger(boolean val)
Definition: DW1000.cpp:756
DW1000Class::TRX_RATE_850KBPS
static const byte TRX_RATE_850KBPS
Definition: DW1000.h:521
DW1000Class::TRX_RATE_6800KBPS
static const byte TRX_RATE_6800KBPS
Definition: DW1000.h:522
LEN_PANADR
#define LEN_PANADR
Definition: DW1000.h:53
DW1000Class::interruptOnReceiveTimeout
static void interruptOnReceiveTimeout(boolean val)
Definition: DW1000.cpp:748
DW1000Class::PREAMBLE_CODE_64MHZ_18
static const byte PREAMBLE_CODE_64MHZ_18
Definition: DW1000.h:567
DW1000Class::TX_PREAMBLE_LEN_1024
static const byte TX_PREAMBLE_LEN_1024
Definition: DW1000.h:534
DW1000Class::getDataLength
static unsigned int getDataLength()
Definition: DW1000.cpp:988
DW1000Class::idle
static void idle()
Definition: DW1000.cpp:764
DW1000Class::getTransmitTimestamp
static void getTransmitTimestamp(DW1000Time &time)
Definition: DW1000.cpp:1030
DW1000Class::setInterruptPolarity
static void setInterruptPolarity(boolean val)
Definition: DW1000.cpp:724
DW1000Class::CHANNEL_4
static const byte CHANNEL_4
Definition: DW1000.h:549
DW1000Class::setDefaults
static void setDefaults()
Definition: DW1000.cpp:942
DW1000Class::PREAMBLE_CODE_16MHZ_6
static const byte PREAMBLE_CODE_16MHZ_6
Definition: DW1000.h:559
DW1000Class::MODE_LONGDATA_FAST_ACCURACY
static const byte MODE_LONGDATA_FAST_ACCURACY[]
Definition: DW1000.h:581
DW1000Class::getData
static void getData(byte data[], unsigned int n)
Definition: DW1000.cpp:1005
DW1000Class::PREAMBLE_CODE_64MHZ_17
static const byte PREAMBLE_CODE_64MHZ_17
Definition: DW1000.h:566
DW1000Class::TX_PREAMBLE_LEN_1536
static const byte TX_PREAMBLE_LEN_1536
Definition: DW1000.h:535
DW1000Class::PREAMBLE_CODE_16MHZ_3
static const byte PREAMBLE_CODE_16MHZ_3
Definition: DW1000.h:556
DW1000Class::setPreambleLength
static void setPreambleLength(byte prealen)
Definition: DW1000.cpp:896
DW1000Class::setReceiverAutoReenable
static void setReceiverAutoReenable(boolean val)
Definition: DW1000.cpp:728
DW1000Class::PAC_SIZE_8
static const byte PAC_SIZE_8
Definition: DW1000.h:540
DW1000Class::CHANNEL_5
static const byte CHANNEL_5
Definition: DW1000.h:550
LEN_SYS_MASK
#define LEN_SYS_MASK
Definition: DW1000.h:101
DW1000Class::end
static void end()
Definition: DW1000.cpp:77
DW1000Class::TX_PREAMBLE_LEN_64
static const byte TX_PREAMBLE_LEN_64
Definition: DW1000.h:530
DW1000Class::enableMode
static void enableMode(const byte mode[])
Definition: DW1000.cpp:215
LEN_CHAN_CTRL
#define LEN_CHAN_CTRL
Definition: DW1000.h:153
DW1000Class::reselect
static void reselect(int ss)
Definition: DW1000.cpp:113
DW1000Class::TX_PREAMBLE_LEN_128
static const byte TX_PREAMBLE_LEN_128
Definition: DW1000.h:531
DW1000Class::MODE_LONGDATA_RANGE_LOWPOWER
static const byte MODE_LONGDATA_RANGE_LOWPOWER[]
Definition: DW1000.h:577
DW1000Class::startTransmit
static void startTransmit()
Definition: DW1000.cpp:791
DW1000Time.h
DW1000Class
Definition: DW1000.h:237
DW1000Class::MODE_LONGDATA_RANGE_ACCURACY
static const byte MODE_LONGDATA_RANGE_ACCURACY[]
Definition: DW1000.h:582
DW1000Class::MODE_SHORTDATA_FAST_LOWPOWER
static const byte MODE_SHORTDATA_FAST_LOWPOWER[]
Definition: DW1000.h:578
LEN_SYS_CTRL
#define LEN_SYS_CTRL
Definition: DW1000.h:69
DW1000Class::PREAMBLE_CODE_64MHZ_20
static const byte PREAMBLE_CODE_64MHZ_20
Definition: DW1000.h:569
DW1000Class::setPreambleCode
static void setPreambleCode(byte preacode)
Definition: DW1000.cpp:933
DW1000Class::PAC_SIZE_64
static const byte PAC_SIZE_64
Definition: DW1000.h:543
DW1000Class::setNetworkId
static void setNetworkId(unsigned int val)
Definition: DW1000.cpp:706