DecaDuino
Ranging/synchronisation over UWB - DecaDuino library for Arduino
DecaDuino Class Reference

#include <DecaDuino.h>

Public Member Functions

 DecaDuino (uint8_t slaveSelectPin=DW1000_CS0_PIN, uint8_t interruptPin=DW1000_IRQ0_PIN)
 DecaDuino Constructor. More...
 
boolean init ()
 Initializes DecaDuino and DWM1000 without addressing fields filtering (Promiscuous mode) More...
 
boolean init (uint32_t shortAddrAndPanId)
 Initializes DecaDuino and DWM1000 with given Short Address and Pan Id. More...
 
void resetDW1000 ()
 Reset the DW1000 chip. More...
 
void setPHRMode (uint8_t mode)
 Set PHR Mode. More...
 
uint8_t getPHRMode (void)
 Returns the PHR Mode. More...
 
void getSystemTimeCounter (uint64_t *p)
 Stores the System Time Counter value in the variable referenced by the pointer passed as an input parameter. More...
 
uint64_t getSystemTimeCounter (void)
 Returns the System Time Counter value. More...
 
uint16_t getPanId ()
 Gets the PanId (Personnal Area Network Identifier) stored in the DW1000's RAM. More...
 
uint16_t getShortAddress ()
 Gets the ShortAddress (16-bit network address, aka IEEE short address) stored in the DW1000's RAM. More...
 
uint64_t getEuid ()
 Gets the Euid (Extended Unique IDentifier) stored in the DW1000's ROM. More...
 
void setPanId (uint16_t panId)
 Sets the PanId (Personnal Area Network Identifier) in the DW1000's RAM. More...
 
void setShortAddress (uint16_t shortAddress)
 Sets the ShortAddress (16-bit network address, aka IEEE short address) in the DW1000's RAM. More...
 
void setShortAddressAndPanId (uint16_t shortAddress, uint16_t panId)
 Sets both the ShortAddress and the PanId in the DW1000's RAM. More...
 
int setShortAddressAndPanId (uint32_t shortAddressPanId)
 Sets both the ShortAddress and the PanId in the DW1000's RAM. More...
 
uint8_t getChannelRaw (void)
 Returns the currently configured radio channels. More...
 
uint8_t getChannel (void)
 Returns the currently configured radio channel. More...
 
uint8_t getRxPrf (void)
 Returns the currently configured Pulse Repetition Frequency. More...
 
uint8_t getTxPcode (void)
 Returns the currently configured Tx Preamble Code. More...
 
uint8_t getRxPcode (void)
 Returns the currently configured Rx Preamble Code. More...
 
bool setChannel (uint8_t channel)
 Sets the radio channels for TX and RX. More...
 
bool setRxPrf (uint8_t prf)
 Sets the Pulse Repetition Frequency. More...
 
bool setTxPcode (uint8_t pcode)
 Sets the Tx Preamble Code. More...
 
bool setRxPcode (uint8_t pcode)
 Sets the Rx Preamble Code. More...
 
int getPreambleLength (void)
 Returns the preamble length. More...
 
bool setPreambleLength (int plength)
 Sets the preamble length. More...
 
uint64_t alignDelayedTransmission (uint64_t wantedDelay)
 Returns an aligned timestamp to use with pdDataRequest() in case of delayed transmissions. More...
 
uint8_t pdDataRequest (uint8_t *buf, uint16_t len)
 Sends a len-byte frame from buf. More...
 
uint8_t pdDataRequest (uint8_t *buf, uint16_t len, uint8_t delayed, uint64_t time)
 Sends a len-byte frame from buf with an optionnal delay. More...
 
uint8_t send (uint8_t *buf, uint16_t len)
 Sends a len-byte frame from buf. More...
 
uint8_t send (uint8_t *buf, uint16_t len, uint8_t delayed, uint64_t time)
 Sends a len-byte frame from buf with an optionnal delay. More...
 
void setRxBuffer (uint8_t *buf, uint16_t *len)
 Sets the RX buffer for future frame reception. Received bytes will be stored at the beginning of the buffer. More...
 
void setRxBuffer (uint8_t *buf, uint16_t *len, uint16_t max)
 Sets the RX buffer for future frame reception. Received bytes will be stored at the end of the buffer of max size. More...
 
void plmeRxEnableRequest (void)
 Sets transceiver mode to receive mode. More...
 
void plmeRxEnableRequest (uint16_t max)
 Sets transceiver mode to receive mode. Received bytes will be stored at the end of the buffer of max size. More...
 
void plmeRxEnableRequest (uint8_t *buf, uint16_t *len)
 Sets transceiver mode to receive mode and set the RX buffer for future frame reception. More...
 
void plmeRxEnableRequest (uint8_t *buf, uint16_t *len, uint16_t max)
 Sets transceiver mode to receive mode and set the RX buffer for future frame reception. Received bytes will be stored at the end of the buffer of max size. More...
 
void plmeRxDisableRequest (void)
 Sets transceiver mode to idle mode. More...
 
void sleepRequest (void)
 Sets transceiver mode to sleep mode. More...
 
uint8_t rxFrameAvailable (void)
 Returns true if a frame has been received. More...
 
uint8_t rxFrameAvailable (uint8_t *buf, uint16_t *len)
 Returns true if a frame has been received, copy received bytes in buf and store message length in len. More...
 
uint8_t rxFrameAvailable (uint8_t *buf, uint16_t *len, uint16_t max)
 Returns true if a frame has been received, copy received bytes in buf and store message length in len. The received bytes shall be copied toward the end of the buffer of size max. More...
 
bool hasTxSucceeded (void)
 Returns true if the last transmission request has been succefully completed. More...
 
uint8_t getTrxStatus (void)
 Gets the DecaDuino transceiver status. More...
 
uint8_t getTemperatureRaw (void)
 Gets the raw value from the DW1000's embedded temperature sensor. More...
 
float getTemperature (void)
 Gets the temperature value in celsius degrees from the DW1000's embedded temperature sensor. More...
 
uint8_t getVoltageRaw (void)
 Gets the raw value from the DW1000's embedded voltage sensor. More...
 
float getVoltage (void)
 Gets the voltage value in volts from the DW1000's embedded voltage sensor. More...
 
uint16_t decodeUint16 (uint8_t *data)
 Builds an uint16 value from two uint8 values. More...
 
void encodeUint16 (uint16_t from, uint8_t *to)
 Formats an uint16 value as a list of uint8 values. More...
 
uint32_t decodeUint32 (uint8_t *data)
 Builds an uint32 value from four uint8 values. More...
 
void encodeUint32 (uint32_t from, uint8_t *to)
 Formats an uint32 value as a list of uint8 values. More...
 
uint64_t decodeUint40 (uint8_t *data)
 Builds an uint64 value from five uint8 values. More...
 
void encodeUint40 (uint64_t from, uint8_t *to)
 Formats an uint64 value with only 5 LSbytes as a list of uint8 values. More...
 
uint64_t decodeUint64 (uint8_t *data)
 Builds an uint64 value from eight uint8 values. More...
 
void encodeUint64 (uint64_t from, uint8_t *to)
 Formats an uint64 value as a list of uint8 values. More...
 
float decodeFloat (uint8_t *data)
 Builds a float value from four uint8 values. More...
 
void encodeFloat (float from, uint8_t *to)
 Formats an float value as a list of uint8 values. More...
 
void printUint64 (uint64_t ui64)
 Prints an uint64_t value on console. More...
 
uint64_t getLastTxTimestamp ()
 Returns last transmitted frame timestamp based on the DWM1000 System Time Counter at 64GHz. More...
 
uint64_t getLastRxTimestamp ()
 Returns last received frame timestamp based on the DWM1000 System Time Counter at 64GHz. More...
 
double getLastRxSkew ()
 Returns last received frame's clock skew, also designated as clock offset in the Decawave documentation. More...
 
uint16_t getAntennaDelay ()
 Returns current antenna delay value. More...
 
void setAntennaDelay (uint16_t newAntennaDelay)
 Sets the current antenna delay value. More...
 

Protected Member Functions

void handleInterrupt ()
 The global interrupt function. More...
 

Static Protected Member Functions

static void isr0 ()
 The first interrupt function. More...
 
static void isr1 ()
 The second interrupt function. More...
 
static void isr2 ()
 The third interrupt function. More...
 

Protected Attributes

SPISettings currentSPISettings
 Current SPI-bus settings. More...
 
uint64_t euid
 Current EUID (Extended Unique IDentifier) More...
 
uint8_t * rxData
 The current (or last) PPDU. More...
 
uint16_t * rxDataLen
 The current PPDU length. More...
 
uint16_t rxDataLenMax
 The max PPDU length. More...
 
uint8_t rxDataAvailable
 Flag indicating if last reception has data. More...
 
uint8_t trxStatus
 Transceiver status. More...
 
bool lastTxOK
 Flag indicating if last transmission is done. More...
 
uint64_t lastTxTimestamp
 Timestamp of last transmitted frame. More...
 
uint64_t lastRxTimestamp
 Timestamp of last received frame. More...
 
double clkOffset
 Last clock offset (aka clock skew) More...
 
uint8_t _slaveSelectPin
 
uint8_t _interruptPin
 

Static Protected Attributes

static DecaDuino_DecaDuinoInterrupt [] = {0, 0, 0}
 

Constructor & Destructor Documentation

◆ DecaDuino()

DecaDuino::DecaDuino ( uint8_t  slaveSelectPin = DW1000_CS0_PIN,
uint8_t  interruptPin = DW1000_IRQ0_PIN 
)

DecaDuino Constructor.

Parameters
slaveSelectPinThe slaveSelect pin number
interruptPinThe interrupt pin number
Author
Adrien van den Bossche
Date
20140701

Member Function Documentation

◆ alignDelayedTransmission()

uint64_t DecaDuino::alignDelayedTransmission ( uint64_t  wantedDelay)

Returns an aligned timestamp to use with pdDataRequest() in case of delayed transmissions.

Parameters
wantedDelayThe required delay to align the delayed transmission
Returns
the aligned timestamp
Author
Adrien van den Bossche
Date
20151028

◆ decodeFloat()

float DecaDuino::decodeFloat ( uint8_t *  data)

Builds a float value from four uint8 values.

Parameters
dataThe address of the uint8_t buffer
Returns
The decoded float
Author
Adrien van den Bossche
Date
20171020

◆ decodeUint16()

uint16_t DecaDuino::decodeUint16 ( uint8_t *  data)

Builds an uint16 value from two uint8 values.

Parameters
dataThe address of the uint8_t buffer
Returns
The decoded uint16_t
Author
Adrien van den Bossche
Date
20111123

◆ decodeUint32()

uint32_t DecaDuino::decodeUint32 ( uint8_t *  data)

Builds an uint32 value from four uint8 values.

Parameters
dataThe address of the uint8_t buffer
Returns
The decoded uint32_t
Author
Adrien van den Bossche
Date
20111123

◆ decodeUint40()

uint64_t DecaDuino::decodeUint40 ( uint8_t *  data)

Builds an uint64 value from five uint8 values.

Parameters
dataThe address of the uint8_t buffer
Returns
The decoded uint64_t

◆ decodeUint64()

uint64_t DecaDuino::decodeUint64 ( uint8_t *  data)

Builds an uint64 value from eight uint8 values.

Parameters
dataThe address of the uint8_t buffer
Returns
The decoded uint64_t
Author
Adrien van den Bossche
Date
20140804

◆ encodeFloat()

void DecaDuino::encodeFloat ( float  from,
uint8_t *  to 
)

Formats an float value as a list of uint8 values.

Parameters
fromThe float value
toThe address of the uint8_t buffer
Returns
No return
Author
Adrien van den Bossche
Date
20171020

◆ encodeUint16()

void DecaDuino::encodeUint16 ( uint16_t  from,
uint8_t *  to 
)

Formats an uint16 value as a list of uint8 values.

Parameters
fromThe uint16_t value
toThe address of the uint8_t buffer
Returns
No return
Author
Adrien van den Bossche
Date
20111011

◆ encodeUint32()

void DecaDuino::encodeUint32 ( uint32_t  from,
uint8_t *  to 
)

Formats an uint32 value as a list of uint8 values.

Parameters
fromThe uint32_t value
toThe address of the uint8_t buffer
Returns
No return
Author
Adrien van den Bossche
Date
20111011

◆ encodeUint40()

void DecaDuino::encodeUint40 ( uint64_t  from,
uint8_t *  to 
)

Formats an uint64 value with only 5 LSbytes as a list of uint8 values.

Parameters
fromThe uint64_t value
toThe address of the uint8_t buffer

◆ encodeUint64()

void DecaDuino::encodeUint64 ( uint64_t  from,
uint8_t *  to 
)

Formats an uint64 value as a list of uint8 values.

Parameters
fromThe uint64_t value
toThe address of the uint8_t buffer
Returns
No return
Author
Adrien van den Bossche
Date
20111011

◆ getAntennaDelay()

uint16_t DecaDuino::getAntennaDelay ( )

Returns current antenna delay value.

Returns
The current antenna delay value
Author
Adrien van den Bossche
Date
20160915

◆ getChannel()

uint8_t DecaDuino::getChannel ( void  )

Returns the currently configured radio channel.

Returns
The channel value as an unsigned byte
Author
Réjane Dalce
Date
20160109

◆ getChannelRaw()

uint8_t DecaDuino::getChannelRaw ( void  )

Returns the currently configured radio channels.

Returns
A byte which MSB is the X channel and the LSB is the X channel
Author
Réjane Dalce
Date
20160109

◆ getEuid()

uint64_t DecaDuino::getEuid ( )

Gets the Euid (Extended Unique IDentifier) stored in the DW1000's ROM.

Returns
The Identifier as an uint64_t value
Author
Adrien van den Bossche
Date
20141115

◆ getLastRxSkew()

double DecaDuino::getLastRxSkew ( )

Returns last received frame's clock skew, also designated as clock offset in the Decawave documentation.

Returns
Last received frame's clock skew
Author
Adrien van den Bossche
Date
20150905

◆ getLastRxTimestamp()

uint64_t DecaDuino::getLastRxTimestamp ( )

Returns last received frame timestamp based on the DWM1000 System Time Counter at 64GHz.

Returns
Last received frame timestamp
Author
Adrien van den Bossche
Date
20140905

◆ getLastTxTimestamp()

uint64_t DecaDuino::getLastTxTimestamp ( )

Returns last transmitted frame timestamp based on the DWM1000 System Time Counter at 64GHz.

Returns
Last transmitted frame timestamp
Author
Adrien van den Bossche
Date
20140905

◆ getPanId()

uint16_t DecaDuino::getPanId ( )

Gets the PanId (Personnal Area Network Identifier) stored in the DW1000's RAM.

Returns
The PanId as an uint16_t value
Author
Adrien van den Bossche
Date
20141115

◆ getPHRMode()

uint8_t DecaDuino::getPHRMode ( void  )

Returns the PHR Mode.

Returns
PHR Mode
Author
Laurent GUERBY
Date
20170329

◆ getPreambleLength()

int DecaDuino::getPreambleLength ( void  )

Returns the preamble length.

Returns
A byte representing the preamble length
Author
François Despaux
Date
20160217

◆ getRxPcode()

uint8_t DecaDuino::getRxPcode ( void  )

Returns the currently configured Rx Preamble Code.

Returns
The Preamble Code value as an unsigned byte
Author
Réjane Dalce
Date
20161003

◆ getRxPrf()

uint8_t DecaDuino::getRxPrf ( void  )

Returns the currently configured Pulse Repetition Frequency.

Returns
The PRF value as an unsigned byte
Author
Réjane Dalce
Date
20161003

◆ getShortAddress()

uint16_t DecaDuino::getShortAddress ( )

Gets the ShortAddress (16-bit network address, aka IEEE short address) stored in the DW1000's RAM.

Returns
The Short Address as an uint16_t value
Author
Adrien van den Bossche
Date
20141115

◆ getSystemTimeCounter() [1/2]

void DecaDuino::getSystemTimeCounter ( uint64_t *  p)

Stores the System Time Counter value in the variable referenced by the pointer passed as an input parameter.

Parameters
pThe address of the uint64_t variable
Returns
No return
Author
Adrien van den Bossche
Date
20141115

◆ getSystemTimeCounter() [2/2]

uint64_t DecaDuino::getSystemTimeCounter ( void  )

Returns the System Time Counter value.

Returns
The System Time Counter value as a uint64_t
Author
Adrien van den Bossche
Date
20141115

◆ getTemperature()

float DecaDuino::getTemperature ( void  )

Gets the temperature value in celsius degrees from the DW1000's embedded temperature sensor.

Returns
The temperature value in celsius degrees
Author
Adrien van den Bossche
Date
20141115
Todo:
To be implemented

◆ getTemperatureRaw()

uint8_t DecaDuino::getTemperatureRaw ( void  )

Gets the raw value from the DW1000's embedded temperature sensor.

Returns
The temperature raw value
Author
Adrien van den Bossche
Date
20141115

◆ getTrxStatus()

uint8_t DecaDuino::getTrxStatus ( void  )

Gets the DecaDuino transceiver status.

Returns
the DecaDuino transceiver status
Author
Adrien van den Bossche
Date
20141115

◆ getTxPcode()

uint8_t DecaDuino::getTxPcode ( void  )

Returns the currently configured Tx Preamble Code.

Returns
The Preamble Code value as an unsigned byte
Author
Réjane Dalce
Date
20161003

◆ getVoltage()

float DecaDuino::getVoltage ( void  )

Gets the voltage value in volts from the DW1000's embedded voltage sensor.

Returns
The voltage value in volts
Author
Adrien van den Bossche
Date
20141115
Todo:
To be implemented

◆ getVoltageRaw()

uint8_t DecaDuino::getVoltageRaw ( void  )

Gets the raw value from the DW1000's embedded voltage sensor.

Returns
The voltage raw value
Author
Adrien van den Bossche
Date
20141115

◆ handleInterrupt()

void DecaDuino::handleInterrupt ( )
protected

The global interrupt function.

Returns
No return
Author
Adrien van den Bossche
Date
20141115

◆ hasTxSucceeded()

bool DecaDuino::hasTxSucceeded ( void  )

Returns true if the last transmission request has been succefully completed.

Returns
true if the last transmission request has been succefully completed
Author
Adrien van den Bossche
Date
20141115

◆ init() [1/2]

boolean DecaDuino::init ( )

Initializes DecaDuino and DWM1000 without addressing fields filtering (Promiscuous mode)

Returns
true if both DecaDuino and DWM1000 have been successfully initialized
Author
Adrien van den Bossche
Date
20140701

◆ init() [2/2]

boolean DecaDuino::init ( uint32_t  shortAddrAndPanId)

Initializes DecaDuino and DWM1000 with given Short Address and Pan Id.

Parameters
shortAddrAndPanIdThe 16-bit short address and 16-bit Pan Id as a 32-bit integer where short address in on the LSB.
Returns
true if both DecaDuino and DWM1000 have been successfully initialized
Author
Adrien van den Bossche
Date
20150905

◆ isr0()

void DecaDuino::isr0 ( )
staticprotected

The first interrupt function.

Returns
No return
Author
Adrien van den Bossche
Date
20141115

◆ isr1()

void DecaDuino::isr1 ( )
staticprotected

The second interrupt function.

Returns
No return
Author
Adrien van den Bossche
Date
20141115

◆ isr2()

void DecaDuino::isr2 ( )
staticprotected

The third interrupt function.

Returns
No return
Author
Adrien van den Bossche
Date
20141115

◆ pdDataRequest() [1/2]

uint8_t DecaDuino::pdDataRequest ( uint8_t *  buf,
uint16_t  len 
)

Sends a len-byte frame from buf.

Parameters
bufThe address of the buffer
lenThe message length
Returns
true if success, false otherwise
Author
Adrien van den Bossche
Date
20141115

◆ pdDataRequest() [2/2]

uint8_t DecaDuino::pdDataRequest ( uint8_t *  buf,
uint16_t  len,
uint8_t  delayed,
uint64_t  time 
)

Sends a len-byte frame from buf with an optionnal delay.

Parameters
bufThe address of the buffer
lenThe message length
delayedThe delayed flag (true or false)
timeThe time to send, based on the DWM1000 System Time Counter at 64GHz
Returns
true if success, false otherwise
Author
Adrien van den Bossche
Date
20141115

◆ plmeRxDisableRequest()

void DecaDuino::plmeRxDisableRequest ( void  )

Sets transceiver mode to idle mode.

Returns
No return
Author
Adrien van den Bossche
Date
20141115

◆ plmeRxEnableRequest() [1/4]

void DecaDuino::plmeRxEnableRequest ( void  )

Sets transceiver mode to receive mode.

Returns
No return
Author
Adrien van den Bossche
Date
20141115

◆ plmeRxEnableRequest() [2/4]

void DecaDuino::plmeRxEnableRequest ( uint16_t  max)

Sets transceiver mode to receive mode. Received bytes will be stored at the end of the buffer of max size.

Parameters
maxThe buffer size
Returns
No return
Author
Adrien van den Bossche
Date
20141115

◆ plmeRxEnableRequest() [3/4]

void DecaDuino::plmeRxEnableRequest ( uint8_t *  buf,
uint16_t *  len 
)

Sets transceiver mode to receive mode and set the RX buffer for future frame reception.

Parameters
bufThe address of the buffer
lenThe address of the message length
Returns
No return
Author
Adrien van den Bossche
Date
20141115

◆ plmeRxEnableRequest() [4/4]

void DecaDuino::plmeRxEnableRequest ( uint8_t *  buf,
uint16_t *  len,
uint16_t  max 
)

Sets transceiver mode to receive mode and set the RX buffer for future frame reception. Received bytes will be stored at the end of the buffer of max size.

Parameters
bufThe address of the buffer
lenThe address of the message length
maxThe buffer size
Returns
No return
Author
Adrien van den Bossche
Date
20141115

◆ printUint64()

void DecaDuino::printUint64 ( uint64_t  ui64)

Prints an uint64_t value on console.

Parameters
ui64The uint64_t value
Returns
No return
Author
Adrien van den Bossche
Date
20141115

◆ resetDW1000()

void DecaDuino::resetDW1000 ( )

Reset the DW1000 chip.

Returns
No return
Author
Adrien van den Bossche
Date
20141115

◆ rxFrameAvailable() [1/3]

uint8_t DecaDuino::rxFrameAvailable ( void  )

Returns true if a frame has been received.

Returns
true if a frame has been received, false otherwise.
Author
Adrien van den Bossche
Date
20141115

◆ rxFrameAvailable() [2/3]

uint8_t DecaDuino::rxFrameAvailable ( uint8_t *  buf,
uint16_t *  len 
)

Returns true if a frame has been received, copy received bytes in buf and store message length in len.

Parameters
bufThe address of the buffer
lenThe address of the message length
Returns
true if a frame has been received, false otherwise.
Author
Adrien van den Bossche
Date
20141115

◆ rxFrameAvailable() [3/3]

uint8_t DecaDuino::rxFrameAvailable ( uint8_t *  buf,
uint16_t *  len,
uint16_t  max 
)

Returns true if a frame has been received, copy received bytes in buf and store message length in len. The received bytes shall be copied toward the end of the buffer of size max.

Parameters
bufThe address of the buffer
lenThe address of the message length
maxThe buffer size
Returns
true if a frame has been received, false otherwise.
Author
Adrien van den Bossche
Date
20141115

◆ send() [1/2]

uint8_t DecaDuino::send ( uint8_t *  buf,
uint16_t  len 
)

Sends a len-byte frame from buf.

Parameters
bufThe address of the buffer
lenThe message length
Returns
true if success, false otherwise
Author
Adrien van den Bossche
Date
20141115

◆ send() [2/2]

uint8_t DecaDuino::send ( uint8_t *  buf,
uint16_t  len,
uint8_t  delayed,
uint64_t  time 
)

Sends a len-byte frame from buf with an optionnal delay.

Parameters
bufThe address of the buffer
lenThe message length
delayedThe delayed flag (true or false)
timeThe time to send, based on the DWM1000 System Time Counter at 64GHz
Returns
true if success, false otherwise
Author
Adrien van den Bossche
Date
20141115

◆ setAntennaDelay()

void DecaDuino::setAntennaDelay ( uint16_t  newAntennaDelay)

Sets the current antenna delay value.

Parameters
antennaDelayThe antenna delay value
Returns
No return
Author
Adrien van den Bossche
Date
20160915

◆ setChannel()

bool DecaDuino::setChannel ( uint8_t  channel)

Sets the radio channels for TX and RX.

Parameters
channelThe channel number to set. Valid values are: 1, 2, 3, 4, 5, 7.
Returns
Indicates whether configuration went well or not
Author
Réjane Dalce
Date
20160109

◆ setPanId()

void DecaDuino::setPanId ( uint16_t  panId)

Sets the PanId (Personnal Area Network Identifier) in the DW1000's RAM.

Parameters
panIdThe 16-bit PANID (PAN Identifier)
Returns
No return
Author
Adrien van den Bossche
Date
20141115

◆ setPHRMode()

void DecaDuino::setPHRMode ( uint8_t  mode)

Set PHR Mode.

Parameters
mode0 for standard 127 bytes frame, 3 for extended 1023 bytes frame
Returns
No return
Author
Laurent GUERBY
Date
20170329

◆ setPreambleLength()

bool DecaDuino::setPreambleLength ( int  plength)

Sets the preamble length.

Parameters
plengthThe preamble length to set. Valid values are: 64, 128, 256, 512, 1024, 1536, 2048, 4096.
Returns
Indicates whether configuration went well or not
Author
François Despaux
Date
20160217

◆ setRxBuffer() [1/2]

void DecaDuino::setRxBuffer ( uint8_t *  buf,
uint16_t *  len 
)

Sets the RX buffer for future frame reception. Received bytes will be stored at the beginning of the buffer.

Parameters
bufThe address of the buffer
lenThe address of the message length
Returns
No return
Author
Adrien van den Bossche
Date
20141115

◆ setRxBuffer() [2/2]

void DecaDuino::setRxBuffer ( uint8_t *  buf,
uint16_t *  len,
uint16_t  max 
)

Sets the RX buffer for future frame reception. Received bytes will be stored at the end of the buffer of max size.

Parameters
bufThe address of the buffer
lenThe address of the message length
maxThe buffer size
Returns
No return
Author
Adrien van den Bossche
Date
20141115

◆ setRxPcode()

bool DecaDuino::setRxPcode ( uint8_t  pcode)

Sets the Rx Preamble Code.

Parameters
pcodeThe Preamble Code to set. Valid values are: 1-20.
Returns
Indicates whether configuration went well or not
Author
Réjane Dalce
Date
20160310

◆ setRxPrf()

bool DecaDuino::setRxPrf ( uint8_t  prf)

Sets the Pulse Repetition Frequency.

Parameters
prfThe PRF value to set. Valid values are: 1, 2.
Returns
Indicates whether configuration went well or not
Author
Réjane Dalce
Date
20160310

◆ setShortAddress()

void DecaDuino::setShortAddress ( uint16_t  shortAddress)

Sets the ShortAddress (16-bit network address, aka IEEE short address) in the DW1000's RAM.

Parameters
shortAddressThe 16-bit short address
Returns
No return
Author
Adrien van den Bossche
Date
20141115

◆ setShortAddressAndPanId() [1/2]

void DecaDuino::setShortAddressAndPanId ( uint16_t  shortAddress,
uint16_t  panId 
)

Sets both the ShortAddress and the PanId in the DW1000's RAM.

Parameters
shortAddressThe 16-bit short address
panIdThe 16-bit PANID (PAN Identifier)
Returns
No return
Author
Adrien van den Bossche
Date
20141115

◆ setShortAddressAndPanId() [2/2]

int DecaDuino::setShortAddressAndPanId ( uint32_t  shortAddressPanId)

Sets both the ShortAddress and the PanId in the DW1000's RAM.

Parameters
shortAddressPanIdThe 16-bit short address and 16-bit Pan Id as a 32-bit integer where short address in on the LSB.
Returns
true if success, false otherwise
Author
Adrien van den Bossche
Date
20141115

◆ setTxPcode()

bool DecaDuino::setTxPcode ( uint8_t  pcode)

Sets the Tx Preamble Code.

Parameters
pcodeThe Preamble Code to set. Valid values are: 1-20.
Returns
Indicates whether configuration went well or not
Author
Réjane Dalce
Date
20160310

◆ sleepRequest()

void DecaDuino::sleepRequest ( void  )

Sets transceiver mode to sleep mode.

Returns
No return
Author
Adrien van den Bossche
Date
20141115

Member Data Documentation

◆ _DecaDuinoInterrupt

DecaDuino * DecaDuino::_DecaDuinoInterrupt = {0, 0, 0}
staticprotected

◆ _interruptPin

uint8_t DecaDuino::_interruptPin
protected

◆ _slaveSelectPin

uint8_t DecaDuino::_slaveSelectPin
protected

◆ clkOffset

double DecaDuino::clkOffset
protected

Last clock offset (aka clock skew)

◆ currentSPISettings

SPISettings DecaDuino::currentSPISettings
protected

Current SPI-bus settings.

◆ euid

uint64_t DecaDuino::euid
protected

Current EUID (Extended Unique IDentifier)

◆ lastRxTimestamp

uint64_t DecaDuino::lastRxTimestamp
protected

Timestamp of last received frame.

◆ lastTxOK

bool DecaDuino::lastTxOK
protected

Flag indicating if last transmission is done.

◆ lastTxTimestamp

uint64_t DecaDuino::lastTxTimestamp
protected

Timestamp of last transmitted frame.

◆ rxData

uint8_t* DecaDuino::rxData
protected

The current (or last) PPDU.

◆ rxDataAvailable

uint8_t DecaDuino::rxDataAvailable
protected

Flag indicating if last reception has data.

◆ rxDataLen

uint16_t* DecaDuino::rxDataLen
protected

The current PPDU length.

◆ rxDataLenMax

uint16_t DecaDuino::rxDataLenMax
protected

The max PPDU length.

◆ trxStatus

uint8_t DecaDuino::trxStatus
protected

Transceiver status.


The documentation for this class was generated from the following files: