72#define AT86RF215_MAX_PKT_LENGTH (2047)
85#define CONFIG_AT86RF215_USE_CLOCK_OUTPUT
88#if defined(DOXYGEN) && !defined(CONFIG_AT86RF215_TRIM_VAL)
101#define CONFIG_AT86RF215_TRIM_VAL (0)
108#ifndef CONFIG_AT86RF215_DEFAULT_CHANNEL
109#define CONFIG_AT86RF215_DEFAULT_CHANNEL (CONFIG_IEEE802154_DEFAULT_CHANNEL)
112#ifndef CONFIG_AT86RF215_DEFAULT_SUBGHZ_CHANNEL
113#define CONFIG_AT86RF215_DEFAULT_SUBGHZ_CHANNEL (CONFIG_IEEE802154_DEFAULT_SUBGHZ_CHANNEL)
121#ifndef CONFIG_AT86RF215_RPC_EN
122#define CONFIG_AT86RF215_RPC_EN (0)
131#ifndef CONFIG_AT86RF215_BATMON_THRESHOLD
132#define CONFIG_AT86RF215_BATMON_THRESHOLD (1800)
140#if IS_ACTIVE(CONFIG_AT86RF215_DEFAULT_LEGACY_OQPSK)
141#define CONFIG_AT86RF215_DEFAULT_PHY_MODE (IEEE802154_PHY_OQPSK)
142#elif IS_ACTIVE(CONFIG_AT86RF215_DEFAULT_MR_OQPSK)
143#define CONFIG_AT86RF215_DEFAULT_PHY_MODE (IEEE802154_PHY_MR_OQPSK)
144#elif IS_ACTIVE(CONFIG_AT86RF215_DEFAULT_MR_OFDM)
145#define CONFIG_AT86RF215_DEFAULT_PHY_MODE (IEEE802154_PHY_MR_OFDM)
148#ifndef CONFIG_AT86RF215_DEFAULT_PHY_MODE
149#define CONFIG_AT86RF215_DEFAULT_PHY_MODE (IEEE802154_PHY_OQPSK)
158#ifndef CONFIG_AT86RF215_DEFAULT_OQPSK_RATE
159#define CONFIG_AT86RF215_DEFAULT_OQPSK_RATE (0)
167#if IS_ACTIVE(CONFIG_AT86RF215_DEFAULT_MR_OQPSK_CHIPS_100)
168#define CONFIG_AT86RF215_DEFAULT_MR_OQPSK_CHIPS (AT86RF215_FCHIP_100)
169#elif IS_ACTIVE(CONFIG_AT86RF215_DEFAULT_MR_OQPSK_CHIPS_200)
170#define CONFIG_AT86RF215_DEFAULT_MR_OQPSK_CHIPS (AT86RF215_FCHIP_200)
171#elif IS_ACTIVE(CONFIG_AT86RF215_DEFAULT_MR_OQPSK_CHIPS_1000)
172#define CONFIG_AT86RF215_DEFAULT_MR_OQPSK_CHIPS (AT86RF215_FCHIP_1000)
173#elif IS_ACTIVE(CONFIG_AT86RF215_DEFAULT_MR_OQPSK_CHIPS_2000)
174#define CONFIG_AT86RF215_DEFAULT_MR_OQPSK_CHIPS (AT86RF215_FCHIP_2000)
177#ifndef CONFIG_AT86RF215_DEFAULT_MR_OQPSK_CHIPS
178#define CONFIG_AT86RF215_DEFAULT_MR_OQPSK_CHIPS (AT86RF215_FCHIP_1000)
186#ifndef CONFIG_AT86RF215_DEFAULT_MR_OQPSK_RATE
187#define CONFIG_AT86RF215_DEFAULT_MR_OQPSK_RATE (2)
195#ifndef CONFIG_AT86RF215_DEFAULT_MR_OFDM_OPT
196#define CONFIG_AT86RF215_DEFAULT_MR_OFDM_OPT (2)
204#ifndef CONFIG_AT86RF215_DEFAULT_MR_OFDM_MCS
205#define CONFIG_AT86RF215_DEFAULT_MR_OFDM_MCS (2)
213#ifndef CONFIG_AT86RF215_DEFAULT_MR_FSK_SRATE
214#define CONFIG_AT86RF215_DEFAULT_MR_FSK_SRATE FSK_SRATE_200K
222#ifndef CONFIG_AT86RF215_DEFAULT_MR_FSK_MOD_IDX
223#define CONFIG_AT86RF215_DEFAULT_MR_FSK_MOD_IDX (64)
231#ifndef CONFIG_AT86RF215_DEFAULT_MR_FSK_MORD
232#define CONFIG_AT86RF215_DEFAULT_MR_FSK_MORD FSK_MORD_4SFK
240#ifndef CONFIG_AT86RF215_DEFAULT_MR_FSK_FEC
241#define CONFIG_AT86RF215_DEFAULT_MR_FSK_FEC IEEE802154_FEC_NONE
248#ifndef CONFIG_AT86RF215_DEFAULT_TXPOWER
249#define CONFIG_AT86RF215_DEFAULT_TXPOWER (CONFIG_IEEE802154_DEFAULT_TXPOWER)
269 AT86RF215_MODE_LEGACY_OQPSK,
270 AT86RF215_MODE_MR_OQPSK,
271 AT86RF215_MODE_MR_OFDM,
272 AT86RF215_MODE_MR_FSK
307#define AT86RF215_OPT_CSMA (0x0010)
308#define AT86RF215_OPT_PROMISCUOUS (0x0020)
309#define AT86RF215_OPT_PRELOADING (0x0040)
310#define AT86RF215_OPT_AUTOACK (0x0080)
311#define AT86RF215_OPT_ACK_REQUESTED (0x0100)
312#define AT86RF215_OPT_AGCH (0x0200)
313#define AT86RF215_OPT_TX_PENDING (0x0400)
314#define AT86RF215_OPT_CCA_PENDING (0x0800)
315#define AT86RF215_OPT_RPC (0x1000)
316#define AT86RF215_OPT_CCATX (0x2000)
323#define AT86RF215_TIMEOUT_ACK (0x0001)
324#define AT86RF215_TIMEOUT_CSMA (0x0002)
362#ifdef MODULE_NETDEV_IEEE802154_MR_FSK
625 size_t len,
size_t offset);
Definitions for netdev common IEEE 802.15.4 code.
Definitions low-level network driver interface.
Low-level GPIO peripheral driver interface definitions.
int at86rf215_enable_batmon(at86rf215_t *dev, unsigned voltage)
Generate an interrupt if supply voltage drops below the configured threshold.
ssize_t at86rf215_send(at86rf215_t *dev, const void *data, size_t len)
Convenience function for simply sending data.
uint8_t at86rf215_get_chan(const at86rf215_t *dev)
Get the configured channel number of the given device.
void at86rf215_set_addr_short(at86rf215_t *dev, uint8_t filter, uint16_t addr)
Set the short address of the given device to multi address filter.
void at86rf215_reset_and_cfg(at86rf215_t *dev)
Trigger a hardware reset and configure radio with default values.
uint64_t at86rf215_get_addr_long(const at86rf215_t *dev)
Get the configured long address of the given device.
uint16_t at86rf215_get_addr_short(const at86rf215_t *dev, uint8_t filter)
Get the short address of the given device form multi address filter.
void at86rf215_set_addr_long(at86rf215_t *dev, uint64_t addr)
Set the long address of the given device.
bool at86rf215_cca(at86rf215_t *dev)
Perform one manual channel clear assessment (CCA)
int at86rf215_tx_exec(at86rf215_t *dev)
Trigger sending of data previously loaded into transmit buffer.
void at86rf215_disable_framefilter(at86rf215_t *dev, uint8_t filter)
Enables a frame filter.
void at86rf215_set_option(at86rf215_t *dev, uint16_t option, bool state)
Enable or disable driver specific options.
size_t at86rf215_tx_load(at86rf215_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 at86rf215_set_chan(at86rf215_t *dev, uint16_t chan)
Set the channel number of the given device.
void at86rf215_tx_abort(at86rf215_t *dev)
Abort sending of data previously loaded into transmit buffer.
int8_t at86rf215_get_ed_level(at86rf215_t *dev)
Get the latest ED level measurement.
uint16_t at86rf215_get_pan(const at86rf215_t *dev, uint8_t filter)
Get the configured PAN ID of the given device from multi address filter.
int16_t at86rf215_get_txpower(const at86rf215_t *dev)
Get the configured transmission power of the given device [in dBm].
void at86rf215_set_clock_output(at86rf215_t *dev, at86rf215_clko_cur_t cur, at86rf215_clko_freq_t freq)
Configure the Clock Output pin.
void at86rf215_set_pan(at86rf215_t *dev, uint8_t filter, uint16_t pan)
Set the PAN ID of the given address filter.
void at86rf215_tx_done(at86rf215_t *dev)
Signal that the transfer of the frame (and optional ACK reception) has finished.
int at86rf215_tx_prepare(at86rf215_t *dev)
Prepare for sending of data.
void(* at86rf215_batmon_cb_t)(void *arg)
Signature for the Battery monitor callback.
void at86rf215_set_cca_threshold(at86rf215_t *dev, int8_t value)
Set the CCA threshold value.
void at86rf215_set_trim(at86rf215_t *dev, uint8_t trim)
Set crystal oscillator trim value.
struct at86rf215_params at86rf215_params_t
struct holding all params needed for device initialization
struct at86rf215 at86rf215_t
Device descriptor for AT86RF215 radio devices.
int8_t at86rf215_get_cca_threshold(const at86rf215_t *dev)
Get the CCA threshold value.
void at86rf215_enable_framefilter(at86rf215_t *dev, uint8_t filter)
Disables a frame filter.
void at86rf215_setup(at86rf215_t *dev_09, at86rf215_t *dev_24, const at86rf215_params_t *params, uint8_t index)
Setup an AT86RF215 based device state.
void at86rf215_disable_batmon(at86rf215_t *dev)
Disable the Battery Monitor interrupt.
bool at86rf215_get_framefilter_enabled(at86rf215_t *dev, uint8_t filter)
Get whether a frame filter is enabled or not.
void at86rf215_set_txpower(const at86rf215_t *dev, int16_t txpower)
Set the transmission power of the given device [in dBm].
void at86rf215_reset(at86rf215_t *dev)
Trigger a hardware reset, configuration is retained.
@ AT86RF215_CLKO_26_MHz
26 MHz
@ AT86RF215_CLKO_2_MHz
2 MHz
@ AT86RF215_CLKO_1_MHz
1 MHz
@ AT86RF215_CLKO_32_MHz
32 MHz
@ AT86RF215_CLKO_16_MHz
16 MHz
@ AT86RF215_CLKO_4_MHz
4 MHz
@ AT86RF215_CLKO_8_MHz
8 MHz
@ AT86RF215_CLKO_OFF
Clock Output Disabled
@ AT86RF215_STATE_TX
sending frame
@ AT86RF215_STATE_SLEEP
sleep mode, not listening
@ AT86RF215_STATE_OFF
radio not configured
@ AT86RF215_STATE_IDLE
idle state, listening
@ AT86RF215_STATE_RX_SEND_ACK
receiving frame, sending ACK
@ AT86RF215_STATE_TX_WAIT_ACK
sending frame, wait for ACK
gpio_t spi_cs_t
Chip select pin type overlaps with gpio_t so it can be casted to this.
Protocol type definitions.
Low-level SPI peripheral driver interface definition.
Base Band Controller registers.
Radio Frontend registers.
struct holding all params needed for device initialization
spi_t spi
SPI bus the device is connected to.
spi_clk_t spi_clk
SPI clock speed to use.
gpio_t reset_pin
GPIO pin connected to the reset pin.
gpio_t int_pin
GPIO pin connected to the interrupt pin.
spi_cs_t cs_pin
GPIO pin connected to chip select.
Device descriptor for AT86RF215 radio devices.
uint32_t csma_backoff_period
CSMA Backoff period.
const at86rf215_RF_regs_t * RF
Radio Frontend Registers.
at86rf215_params_t params
parameters for initialization
uint8_t csma_maxbe
CSMA maximum backoff exponent.
uint32_t ack_timeout_usec
time to wait before retransmission in µs
uint16_t flags
Device specific flags.
uint8_t csma_retries_max
number of retries until channel is clear
uint8_t retries
retries left
uint8_t csma_retries
CSMA retries left.
int8_t csma_ed
CSMA energy detect threshold.
xtimer_t timer
timer for ACK & CSMA timeout
uint8_t csma_minbe
CSMA minimum backoff exponent.
uint16_t num_chans
Number of legal channel at current modulation.
const at86rf215_BBC_regs_t * BBC
Baseband Registers.
uint8_t retries_max
number of retries until ACK is received
uint16_t tx_frame_len
length of the current TX frame
struct at86rf215 * sibling
The other radio.
uint8_t timeout
indicates which timeout was reached
netdev_ieee802154_t netdev
netdev parent struct
uint8_t state
current state of the radio
Extended structure to hold IEEE 802.15.4 driver state.
uint16_t pan
IEEE 802.15.4 specific fields.
int16_t txpower
tx power in dBm
xtimer interface definitions