Loading...
Searching...
No Matches
AT86RF2xx based drivers

This module contains drivers for radio devices in Atmel's AT86RF2xx series. More...

Detailed Description

This module contains drivers for radio devices in Atmel's AT86RF2xx series.

The driver is aimed to work with all devices of this series.

Files

file  at86rf2xx_aes.h
 The extended feature set of at86rf2xx transceivers comprises a hardware implementation of AES.
 
file  at86rf2xx_internal.h
 Internal interfaces for AT86RF2xx drivers.
 
file  at86rf2xx_netdev.h
 Netdev interface to AT86RF2xx drivers.
 
file  at86rf2xx_params.h
 Default configuration for the AT86RF2xx driver.
 
file  at86rf2xx_registers.h
 Register and command definitions for AT86RF2xx devices.
 
file  at86rf2xx.h
 Interface definition for AT86RF2xx based drivers.
 

Data Structures

struct  at86rf2xx_params
 struct holding all params needed for device initialization More...
 
struct  at86rf2xx_t
 Device descriptor for AT86RF2XX radio devices. More...
 

Macros

#define AT86RF2XX_MAX_PKT_LENGTH   (IEEE802154_FRAME_LEN_MAX)
 Maximum possible packet size in byte.
 
#define AT86RF2XX_DEFAULT_TXPOWER   (CONFIG_IEEE802154_DEFAULT_TXPOWER)
 Default TX power (0dBm)
 
#define RSSI_BASE_VAL   (-91)
 Base (minimal) RSSI value in dBm.
 
#define MIN_RX_SENSITIVITY   (-101)
 Min Receiver sensitivity value in dBm.
 
#define AT86RF2XX_IS_PERIPH   (0)
 Whether there is a periph version of the radio.
 
#define AT86RF2XX_HAVE_ED_REGISTER   (0)
 ED Register.
 
#define AT86RF2XX_HAVE_SUBGHZ   (0)
 Support for SubGHz bands.
 
#define AT86RF2XX_HAVE_RETRIES   (1)
 Frame retry counter reporting.
 
#define AT86RF2XX_HAVE_RETRIES_REG   (0)
 Frame retry counter register.
 
#define AT86RF2XX_HAVE_TX_START_IRQ   (0)
 TX Start IRQ.
 
#define AT86RF2XX_RANDOM_NUMBER_GENERATOR   (0)
 Random Number Generator.
 
#define AT86RF2XX_SMART_IDLE_LISTENING   (0)
 Smart idle listening feature.
 
#define AT86RF2XX_PHY_STATE_RX   AT86RF2XX_STATE_RX_ON
 Internal radio state equivalent to RX_ON.
 
#define AT86RF2XX_PHY_STATE_RX_BUSY   AT86RF2XX_STATE_BUSY_RX
 Internal radio state equivalent to RX_BUSY.
 
#define AT86RF2XX_PHY_STATE_TX   AT86RF2XX_STATE_PLL_ON
 Internal radio state equivalent to TX_ON.
 
#define AT86RF2XX_PHY_STATE_TX_BUSY   AT86RF2XX_STATE_BUSY_TX
 Internal radio state equivalent to TX_BUSY.
 

Typedefs

typedef struct at86rf2xx_params at86rf2xx_params_t
 struct holding all params needed for device initialization
 

Functions

void at86rf2xx_setup (at86rf2xx_t *dev, const at86rf2xx_params_t *params, uint8_t index)
 Setup an AT86RF2xx based device state.
 
void at86rf2xx_reset (at86rf2xx_t *dev)
 Trigger a hardware reset and configure radio with default values.
 
void at86rf2xx_set_addr_short (at86rf2xx_t *dev, const network_uint16_t *addr)
 Set the short address of the given device.
 
void at86rf2xx_set_addr_long (at86rf2xx_t *dev, const eui64_t *addr)
 Set the long address of the given device.
 
uint8_t at86rf2xx_get_phy_mode (at86rf2xx_t *dev)
 Get the PHY mode of the given device.
 
uint8_t at86rf2xx_get_rate (at86rf2xx_t *dev)
 Get the current O-QPSK rate mode of the PHY.
 
int at86rf2xx_set_rate (at86rf2xx_t *dev, uint8_t rate)
 Set the current O-QPSK rate mode of the PHY rate modes > 0 are proprietary.
 
void at86rf2xx_set_pan (at86rf2xx_t *dev, uint16_t pan)
 Set the PAN ID of the given device.
 
void at86rf2xx_set_txpower (const at86rf2xx_t *dev, int16_t txpower, uint8_t channel)
 Set the transmission power of the given device [in dBm].
 
int8_t at86rf2xx_get_rxsensitivity (const at86rf2xx_t *dev)
 Get the configured receiver sensitivity of the given device [in dBm].
 
void at86rf2xx_set_rxsensitivity (const at86rf2xx_t *dev, int8_t rxsens)
 Set the receiver sensitivity of the given device [in dBm].
 
uint8_t at86rf2xx_get_max_retries (const at86rf2xx_t *dev)
 Get the maximum number of retransmissions.
 
void at86rf2xx_set_max_retries (const at86rf2xx_t *dev, uint8_t max)
 Set the maximum number of retransmissions.
 
uint8_t at86rf2xx_get_csma_max_retries (const at86rf2xx_t *dev)
 Get the maximum number of channel access attempts per frame (CSMA)
 
void at86rf2xx_set_csma_max_retries (const at86rf2xx_t *dev, int8_t retries)
 Set the maximum number of channel access attempts per frame (CSMA)
 
void at86rf2xx_set_csma_backoff_exp (const at86rf2xx_t *dev, uint8_t min, uint8_t max)
 Set the min and max backoff exponent for CSMA/CA.
 
void at86rf2xx_set_csma_seed (const at86rf2xx_t *dev, const uint8_t entropy[2])
 Set seed for CSMA random backoff.
 
int8_t at86rf2xx_get_cca_threshold (const at86rf2xx_t *dev)
 Get the CCA threshold value.
 
void at86rf2xx_set_cca_threshold (const at86rf2xx_t *dev, int8_t value)
 Set the CCA threshold value.
 
int8_t at86rf2xx_get_ed_level (at86rf2xx_t *dev)
 Get the latest ED level measurement.
 
void at86rf2xx_set_option (at86rf2xx_t *dev, uint16_t option, bool state)
 Enable or disable driver specific options.
 
uint8_t at86rf2xx_set_state (at86rf2xx_t *dev, uint8_t state)
 Set the state of the given device (trigger a state change)
 
void at86rf2xx_tx_prepare (at86rf2xx_t *dev)
 Prepare for sending of data.
 
size_t at86rf2xx_tx_load (at86rf2xx_t *dev, const uint8_t *data, size_t len, size_t offset)
 Load chunks of data into the transmit buffer of the given device.
 
void at86rf2xx_tx_exec (at86rf2xx_t *dev)
 Trigger sending of data previously loaded into transmit buffer.
 
bool at86rf2xx_cca (at86rf2xx_t *dev)
 Perform one manual channel clear assessment (CCA)
 
void at86rf2xx_enable_smart_idle (at86rf2xx_t *dev)
 Enable the smart receive technology (SRT)
 
void at86rf2xx_disable_smart_idle (at86rf2xx_t *dev)
 Disable the smart receive technology (SRT)
 

Channel configuration

#define AT86RF2XX_MIN_CHANNEL   (IEEE802154_CHANNEL_MIN)
 
#define AT86RF2XX_MAX_CHANNEL   (IEEE802154_CHANNEL_MAX)
 
#define AT86RF2XX_DEFAULT_CHANNEL   (CONFIG_IEEE802154_DEFAULT_CHANNEL)
 
#define AT86RF2XX_DEFAULT_PAGE   (0)
 

Flags for device internal states (see datasheet)

#define AT86RF2XX_STATE_P_ON   (0x00)
 initial power on
 
#define AT86RF2XX_STATE_BUSY_RX   (0x01)
 busy receiving data (basic mode)
 
#define AT86RF2XX_STATE_BUSY_TX   (0x02)
 busy transmitting data (basic mode)
 
#define AT86RF2XX_STATE_FORCE_TRX_OFF   (0x03)
 force transition to idle
 
#define AT86RF2XX_STATE_RX_ON   (0x06)
 listen mode (basic mode)
 
#define AT86RF2XX_STATE_TRX_OFF   (0x08)
 idle
 
#define AT86RF2XX_STATE_PLL_ON   (0x09)
 ready to transmit
 
#define AT86RF2XX_STATE_SLEEP   (0x0f)
 sleep mode
 
#define AT86RF2XX_STATE_BUSY_RX_AACK   (0x11)
 busy receiving data (extended mode)
 
#define AT86RF2XX_STATE_BUSY_TX_ARET   (0x12)
 busy transmitting data (extended mode)
 
#define AT86RF2XX_STATE_RX_AACK_ON   (0x16)
 wait for incoming data
 
#define AT86RF2XX_STATE_TX_ARET_ON   (0x19)
 ready for sending data
 
#define AT86RF2XX_STATE_IN_PROGRESS   (0x1f)
 ongoing state conversion
 

Internal device option flags

#define AT86RF2XX_OPT_CSMA   (0x0010)
 CSMA active.
 
#define AT86RF2XX_OPT_PROMISCUOUS   (0x0020)
 promiscuous mode active
 
#define AT86RF2XX_OPT_PRELOADING   (0x0040)
 preloading enabled
 
#define AT86RF2XX_OPT_AUTOACK   (0x0080)
 Auto ACK active.
 
#define AT86RF2XX_OPT_ACK_PENDING   (0x0100)
 ACK frames with data pending.
 

Macro Definition Documentation

◆ AT86RF2XX_DEFAULT_CHANNEL

#define AT86RF2XX_DEFAULT_CHANNEL   (CONFIG_IEEE802154_DEFAULT_CHANNEL)

Definition at line 70 of file at86rf2xx.h.

◆ AT86RF2XX_DEFAULT_PAGE

#define AT86RF2XX_DEFAULT_PAGE   (0)

Definition at line 71 of file at86rf2xx.h.

◆ AT86RF2XX_DEFAULT_TXPOWER

#define AT86RF2XX_DEFAULT_TXPOWER   (CONFIG_IEEE802154_DEFAULT_TXPOWER)

Default TX power (0dBm)

Definition at line 79 of file at86rf2xx.h.

◆ AT86RF2XX_HAVE_ED_REGISTER

#define AT86RF2XX_HAVE_ED_REGISTER   (0)

ED Register.

Definition at line 126 of file at86rf2xx.h.

◆ AT86RF2XX_HAVE_RETRIES

#define AT86RF2XX_HAVE_RETRIES   (1)

Frame retry counter reporting.

The AT86RF2XX_HAVE_RETRIES flag enables support for NETOPT_TX_RETRIES NEEDED operation.

Definition at line 145 of file at86rf2xx.h.

◆ AT86RF2XX_HAVE_RETRIES_REG

#define AT86RF2XX_HAVE_RETRIES_REG   (0)

Frame retry counter register.

Some radios include the XAH_CTRL_2 register which contains the frame retry counter. Only the at86rf232 and the at86rf233 support this register.

Definition at line 159 of file at86rf2xx.h.

◆ AT86RF2XX_HAVE_SUBGHZ

#define AT86RF2XX_HAVE_SUBGHZ   (0)

Support for SubGHz bands.

Definition at line 135 of file at86rf2xx.h.

◆ AT86RF2XX_HAVE_TX_START_IRQ

#define AT86RF2XX_HAVE_TX_START_IRQ   (0)

TX Start IRQ.

Definition at line 168 of file at86rf2xx.h.

◆ AT86RF2XX_IS_PERIPH

#define AT86RF2XX_IS_PERIPH   (0)

Whether there is a periph version of the radio.

Definition at line 117 of file at86rf2xx.h.

◆ AT86RF2XX_MAX_CHANNEL

#define AT86RF2XX_MAX_CHANNEL   (IEEE802154_CHANNEL_MAX)

Definition at line 69 of file at86rf2xx.h.

◆ AT86RF2XX_MAX_PKT_LENGTH

#define AT86RF2XX_MAX_PKT_LENGTH   (IEEE802154_FRAME_LEN_MAX)

Maximum possible packet size in byte.

Definition at line 54 of file at86rf2xx.h.

◆ AT86RF2XX_MIN_CHANNEL

#define AT86RF2XX_MIN_CHANNEL   (IEEE802154_CHANNEL_MIN)

Definition at line 68 of file at86rf2xx.h.

◆ AT86RF2XX_OPT_ACK_PENDING

#define AT86RF2XX_OPT_ACK_PENDING   (0x0100)

ACK frames with data pending.

Definition at line 231 of file at86rf2xx.h.

◆ AT86RF2XX_OPT_AUTOACK

#define AT86RF2XX_OPT_AUTOACK   (0x0080)

Auto ACK active.

Definition at line 230 of file at86rf2xx.h.

◆ AT86RF2XX_OPT_CSMA

#define AT86RF2XX_OPT_CSMA   (0x0010)

CSMA active.

Definition at line 227 of file at86rf2xx.h.

◆ AT86RF2XX_OPT_PRELOADING

#define AT86RF2XX_OPT_PRELOADING   (0x0040)

preloading enabled

Definition at line 229 of file at86rf2xx.h.

◆ AT86RF2XX_OPT_PROMISCUOUS

#define AT86RF2XX_OPT_PROMISCUOUS   (0x0020)

promiscuous mode active

Definition at line 228 of file at86rf2xx.h.

◆ AT86RF2XX_PHY_STATE_RX

#define AT86RF2XX_PHY_STATE_RX   AT86RF2XX_STATE_RX_ON

Internal radio state equivalent to RX_ON.

Definition at line 239 of file at86rf2xx.h.

◆ AT86RF2XX_PHY_STATE_RX_BUSY

#define AT86RF2XX_PHY_STATE_RX_BUSY   AT86RF2XX_STATE_BUSY_RX

Internal radio state equivalent to RX_BUSY.

Definition at line 243 of file at86rf2xx.h.

◆ AT86RF2XX_PHY_STATE_TX

#define AT86RF2XX_PHY_STATE_TX   AT86RF2XX_STATE_PLL_ON

Internal radio state equivalent to TX_ON.

Definition at line 247 of file at86rf2xx.h.

◆ AT86RF2XX_PHY_STATE_TX_BUSY

#define AT86RF2XX_PHY_STATE_TX_BUSY   AT86RF2XX_STATE_BUSY_TX

Internal radio state equivalent to TX_BUSY.

Definition at line 251 of file at86rf2xx.h.

◆ AT86RF2XX_RANDOM_NUMBER_GENERATOR

#define AT86RF2XX_RANDOM_NUMBER_GENERATOR   (0)

Random Number Generator.

Most AT86RF radios have the option to use the highest bits of the RSSI register as a source of randomness. See Section 11.2 of the at86rf233 reference manual. (RND_VALUE)

Definition at line 184 of file at86rf2xx.h.

◆ AT86RF2XX_SMART_IDLE_LISTENING

#define AT86RF2XX_SMART_IDLE_LISTENING   (0)

Smart idle listening feature.

This feature optimizes radio operation in the listening mode, reducing current consumption by ~50%. It is supported by only at86rf233. The reference manual recommends to disable this feature for RSSI measurements or random number generation (Section 8.4 and Section 11.2).

Definition at line 201 of file at86rf2xx.h.

◆ AT86RF2XX_STATE_BUSY_RX

#define AT86RF2XX_STATE_BUSY_RX   (0x01)

busy receiving data (basic mode)

Definition at line 209 of file at86rf2xx.h.

◆ AT86RF2XX_STATE_BUSY_RX_AACK

#define AT86RF2XX_STATE_BUSY_RX_AACK   (0x11)

busy receiving data (extended mode)

Definition at line 216 of file at86rf2xx.h.

◆ AT86RF2XX_STATE_BUSY_TX

#define AT86RF2XX_STATE_BUSY_TX   (0x02)

busy transmitting data (basic mode)

Definition at line 210 of file at86rf2xx.h.

◆ AT86RF2XX_STATE_BUSY_TX_ARET

#define AT86RF2XX_STATE_BUSY_TX_ARET   (0x12)

busy transmitting data (extended mode)

Definition at line 217 of file at86rf2xx.h.

◆ AT86RF2XX_STATE_FORCE_TRX_OFF

#define AT86RF2XX_STATE_FORCE_TRX_OFF   (0x03)

force transition to idle

Definition at line 211 of file at86rf2xx.h.

◆ AT86RF2XX_STATE_IN_PROGRESS

#define AT86RF2XX_STATE_IN_PROGRESS   (0x1f)

ongoing state conversion

Definition at line 220 of file at86rf2xx.h.

◆ AT86RF2XX_STATE_P_ON

#define AT86RF2XX_STATE_P_ON   (0x00)

initial power on

Definition at line 208 of file at86rf2xx.h.

◆ AT86RF2XX_STATE_PLL_ON

#define AT86RF2XX_STATE_PLL_ON   (0x09)

ready to transmit

Definition at line 214 of file at86rf2xx.h.

◆ AT86RF2XX_STATE_RX_AACK_ON

#define AT86RF2XX_STATE_RX_AACK_ON   (0x16)

wait for incoming data

Definition at line 218 of file at86rf2xx.h.

◆ AT86RF2XX_STATE_RX_ON

#define AT86RF2XX_STATE_RX_ON   (0x06)

listen mode (basic mode)

Definition at line 212 of file at86rf2xx.h.

◆ AT86RF2XX_STATE_SLEEP

#define AT86RF2XX_STATE_SLEEP   (0x0f)

sleep mode

Definition at line 215 of file at86rf2xx.h.

◆ AT86RF2XX_STATE_TRX_OFF

#define AT86RF2XX_STATE_TRX_OFF   (0x08)

idle

Definition at line 213 of file at86rf2xx.h.

◆ AT86RF2XX_STATE_TX_ARET_ON

#define AT86RF2XX_STATE_TX_ARET_ON   (0x19)

ready for sending data

Definition at line 219 of file at86rf2xx.h.

◆ MIN_RX_SENSITIVITY

#define MIN_RX_SENSITIVITY   (-101)

Min Receiver sensitivity value in dBm.

Definition at line 108 of file at86rf2xx.h.

◆ RSSI_BASE_VAL

#define RSSI_BASE_VAL   (-91)

Base (minimal) RSSI value in dBm.

Definition at line 95 of file at86rf2xx.h.

Function Documentation

◆ at86rf2xx_cca()

bool at86rf2xx_cca ( at86rf2xx_t dev)

Perform one manual channel clear assessment (CCA)

The CCA mode and threshold level depends on the current transceiver settings.

Parameters
[in]devdevice to use
Returns
true if channel is determined clear
false if channel is determined busy

◆ at86rf2xx_disable_smart_idle()

void at86rf2xx_disable_smart_idle ( at86rf2xx_t dev)

Disable the smart receive technology (SRT)

Parameters
[in]devdevice to use

◆ at86rf2xx_enable_smart_idle()

void at86rf2xx_enable_smart_idle ( at86rf2xx_t dev)

Enable the smart receive technology (SRT)

The SRT reduces the power consumption during RX listening periods.

Parameters
[in]devdevice to use

◆ at86rf2xx_get_cca_threshold()

int8_t at86rf2xx_get_cca_threshold ( const at86rf2xx_t dev)

Get the CCA threshold value.

Parameters
[in]devdevice to read value from
Returns
the current CCA threshold value

◆ at86rf2xx_get_csma_max_retries()

uint8_t at86rf2xx_get_csma_max_retries ( const at86rf2xx_t dev)

Get the maximum number of channel access attempts per frame (CSMA)

Parameters
[in]devdevice to read from
Returns
configured number of retries

◆ at86rf2xx_get_ed_level()

int8_t at86rf2xx_get_ed_level ( at86rf2xx_t dev)

Get the latest ED level measurement.

Parameters
[in]devdevice to read value from
Returns
the last ED level

◆ at86rf2xx_get_max_retries()

uint8_t at86rf2xx_get_max_retries ( const at86rf2xx_t dev)

Get the maximum number of retransmissions.

Parameters
[in]devdevice to read from
Returns
configured number of retransmissions

◆ at86rf2xx_get_phy_mode()

uint8_t at86rf2xx_get_phy_mode ( at86rf2xx_t dev)

Get the PHY mode of the given device.

Parameters
[in,out]devdevice to read from
Returns
the currently set phy mode

◆ at86rf2xx_get_rate()

uint8_t at86rf2xx_get_rate ( at86rf2xx_t dev)

Get the current O-QPSK rate mode of the PHY.

Parameters
[in]devdevice to read from
Returns
the currently set rate mode

◆ at86rf2xx_get_rxsensitivity()

int8_t at86rf2xx_get_rxsensitivity ( const at86rf2xx_t dev)

Get the configured receiver sensitivity of the given device [in dBm].

Parameters
[in]devdevice to read from
Returns
configured receiver sensitivity in dBm

◆ at86rf2xx_reset()

void at86rf2xx_reset ( at86rf2xx_t dev)

Trigger a hardware reset and configure radio with default values.

Parameters
[in,out]devdevice to reset

◆ at86rf2xx_set_addr_long()

void at86rf2xx_set_addr_long ( at86rf2xx_t dev,
const eui64_t addr 
)

Set the long address of the given device.

Parameters
[in,out]devdevice to write to
[in]addr(8-byte) long address to set

◆ at86rf2xx_set_addr_short()

void at86rf2xx_set_addr_short ( at86rf2xx_t dev,
const network_uint16_t addr 
)

Set the short address of the given device.

Parameters
[in,out]devdevice to write to
[in]addr(2-byte) short address to set

◆ at86rf2xx_set_cca_threshold()

void at86rf2xx_set_cca_threshold ( const at86rf2xx_t dev,
int8_t  value 
)

Set the CCA threshold value.

Parameters
[in]devdevice to write to
[in]valuethe new CCA threshold value

◆ at86rf2xx_set_csma_backoff_exp()

void at86rf2xx_set_csma_backoff_exp ( const at86rf2xx_t dev,
uint8_t  min,
uint8_t  max 
)

Set the min and max backoff exponent for CSMA/CA.

  • Maximum BE: 0 - 8
  • Minimum BE: 0 - [max]
Parameters
[in]devdevice to write to
[in]minthe minimum BE
[in]maxthe maximum BE

◆ at86rf2xx_set_csma_max_retries()

void at86rf2xx_set_csma_max_retries ( const at86rf2xx_t dev,
int8_t  retries 
)

Set the maximum number of channel access attempts per frame (CSMA)

This setting specifies the number of attempts to access the channel to transmit a frame. If the channel is busy retries times, then frame transmission fails. Valid values: 0 to 5, -1 means CSMA disabled

Parameters
[in]devdevice to write to
[in]retriesthe maximum number of retries

◆ at86rf2xx_set_csma_seed()

void at86rf2xx_set_csma_seed ( const at86rf2xx_t dev,
const uint8_t  entropy[2] 
)

Set seed for CSMA random backoff.

Parameters
[in]devdevice to write to
[in]entropy11 bit of entropy as seed for random backoff

◆ at86rf2xx_set_max_retries()

void at86rf2xx_set_max_retries ( const at86rf2xx_t dev,
uint8_t  max 
)

Set the maximum number of retransmissions.

This setting specifies the number of attempts to retransmit a frame, when it was not acknowledged by the recipient, before the transaction gets cancelled. The maximum value is 7.

Parameters
[in]devdevice to write to
[in]maxthe maximum number of retransmissions

◆ at86rf2xx_set_option()

void at86rf2xx_set_option ( at86rf2xx_t dev,
uint16_t  option,
bool  state 
)

Enable or disable driver specific options.

Parameters
[in,out]devdevice to set/clear option flag for
[in]optionoption to enable/disable
[in]statetrue for enable, false for disable

◆ at86rf2xx_set_pan()

void at86rf2xx_set_pan ( at86rf2xx_t dev,
uint16_t  pan 
)

Set the PAN ID of the given device.

Parameters
[in,out]devdevice to write to
[in]panPAN ID to set

◆ at86rf2xx_set_rate()

int at86rf2xx_set_rate ( at86rf2xx_t dev,
uint8_t  rate 
)

Set the current O-QPSK rate mode of the PHY rate modes > 0 are proprietary.

rate 0: 250 kbit/s (IEEE mode) rate 1: 500 kbit/s rate 2: 1000 kbit/s (compatible with AT86RF215) rate 3: 2000 kbit/s

Parameters
[in]devdevice to write to
[in]ratethe selected data rate mode (0-3)
Returns
0 on success, otherwise error value

◆ at86rf2xx_set_rxsensitivity()

void at86rf2xx_set_rxsensitivity ( const at86rf2xx_t dev,
int8_t  rxsens 
)

Set the receiver sensitivity of the given device [in dBm].

If the device does not support the exact dBm value given, it will set a value as close as possible to the given value. If the given value is larger or lower then the maximal or minimal possible value, the min or max value is set, respectively.

Parameters
[in]devdevice to write to
[in]rxsensrx sensitivity in dBm

◆ at86rf2xx_set_state()

uint8_t at86rf2xx_set_state ( at86rf2xx_t dev,
uint8_t  state 
)

Set the state of the given device (trigger a state change)

Parameters
[in,out]devdevice to change state of
[in]statethe targeted new state
Returns
the previous state before the new state was set

◆ at86rf2xx_set_txpower()

void at86rf2xx_set_txpower ( const at86rf2xx_t dev,
int16_t  txpower,
uint8_t  channel 
)

Set the transmission power of the given device [in dBm].

If the device does not support the exact dBm value given, it will set a value as close as possible to the given value. If the given value is larger or lower then the maximal or minimal possible value, the min or max value is set, respectively.

Parameters
[in]devdevice to write to
[in]txpowertransmission power in dBm
[in]channelthe current channel

◆ at86rf2xx_setup()

void at86rf2xx_setup ( at86rf2xx_t dev,
const at86rf2xx_params_t params,
uint8_t  index 
)

Setup an AT86RF2xx based device state.

Parameters
[out]devdevice descriptor
[in]paramsparameters for device initialization
[in]indexindex of params in a global parameter struct array. If initialized manually, pass a unique identifier instead.

◆ at86rf2xx_tx_exec()

void at86rf2xx_tx_exec ( at86rf2xx_t dev)

Trigger sending of data previously loaded into transmit buffer.

Parameters
[in]devdevice to trigger

◆ at86rf2xx_tx_load()

size_t at86rf2xx_tx_load ( at86rf2xx_t dev,
const uint8_t *  data,
size_t  len,
size_t  offset 
)

Load chunks of data into the transmit buffer of the given device.

Parameters
[in,out]devdevice to write data to
[in]databuffer containing the data to load
[in]lennumber of bytes in buffer
[in]offsetoffset used when writing data to internal buffer
Returns
offset + number of bytes written

◆ at86rf2xx_tx_prepare()

void at86rf2xx_tx_prepare ( at86rf2xx_t dev)

Prepare for sending of data.

This function puts the given device into the TX state, so no receiving of data is possible after it was called.

Parameters
[in,out]devdevice to prepare for sending