IEEE802.15.4 Radio Hardware Abstraction Layer

This is a Hardware Abstraction Layer for IEEE802.15.4 compatible radios. More...

Detailed Description

This is a Hardware Abstraction Layer for IEEE802.15.4 compatible radios.

Warning
This feature is experimental! This API is experimental and in an early state - expect changes!
Author
José I. Alamos jose..nosp@m.alam.nosp@m.os@ha.nosp@m.w-ha.nosp@m.mburg.nosp@m..de

Data Structures

struct  ieee802154_csma_be_t
 CSMA-CA exponential backoff parameters. More...
 
struct  ieee802154_rx_info_t
 RX information associated to a frame. More...
 
struct  ieee802154_tx_info_t
 TX information of the last transmitted frame. More...
 
struct  ieee802154_dev
 the IEEE802.15.4 device descriptor More...
 
struct  ieee802154_phy_conf_t
 Holder of the PHY configuration. More...
 
struct  ieee802154_radio_ops
 Radio ops struct declaration. More...
 
struct  ieee802154_sec_dev
 IEEE802.15.4 security device descriptor. More...
 
struct  ieee802154_radio_cipher_ops
 Struct of security operations. More...
 

Typedefs

typedef struct ieee802154_radio_ops ieee802154_radio_ops_t
 Forward declaration of the radio ops structure.
 
typedef struct ieee802154_dev ieee802154_dev_t
 Forward declaration of the IEEE802.15.4 device descriptor.
 
typedef void(* ieee802154_cb_t) (ieee802154_dev_t *dev, ieee802154_trx_ev_t status)
 Prototype of the IEEE802.15.4 device event callback. More...
 
typedef struct ieee802154_radio_cipher_ops ieee802154_radio_cipher_ops_t
 Forward declaration of the radio cipher ops structure.
 
typedef struct ieee802154_sec_dev ieee802154_sec_dev_t
 Forward declaration of the IEEE802.15.4 security device descriptor.
 

Enumerations

enum  ieee802154_rf_caps_t {
  IEEE802154_CAP_FRAME_RETRANS, IEEE802154_CAP_AUTO_CSMA, IEEE802154_CAP_IRQ_ACK_TIMEOUT, IEEE802154_CAP_24_GHZ,
  IEEE802154_CAP_SUB_GHZ, IEEE802154_CAP_IRQ_CRC_ERROR, IEEE802154_CAP_IRQ_TX_DONE, IEEE802154_CAP_IRQ_RX_START,
  IEEE802154_CAP_IRQ_TX_START, IEEE802154_CAP_IRQ_CCA_DONE, IEEE802154_CAP_FRAME_RETRANS_INFO, IEEE802154_CAP_REG_RETENTION
}
 IEEE802.15.4 Radio capabilities. More...
 
enum  ieee802154_tx_status_t { TX_STATUS_SUCCESS, TX_STATUS_FRAME_PENDING, TX_STATUS_NO_ACK, TX_STATUS_MEDIUM_BUSY }
 Transmission status. More...
 
enum  ieee802154_trx_state_t { IEEE802154_TRX_STATE_TRX_OFF, IEEE802154_TRX_STATE_RX_ON, IEEE802154_TRX_STATE_TX_ON }
 IEEE802.15.4 transceiver states (not to confuse with device states) More...
 
enum  ieee802154_trx_ev_t {
  IEEE802154_RADIO_INDICATION_RX_START, IEEE802154_RADIO_INDICATION_CRC_ERROR, IEEE802154_RADIO_INDICATION_TX_START, IEEE802154_RADIO_INDICATION_RX_DONE,
  IEEE802154_RADIO_CONFIRM_TX_DONE, IEEE802154_RADIO_CONFIRM_CCA
}
 IEEE802.15.4 Radio HAL events. More...
 
enum  ieee802154_cca_mode_t { IEEE802154_CCA_MODE_ED_THRESHOLD, IEEE802154_CCA_MODE_CARRIER_SENSING, IEEE802154_CCA_MODE_ED_THRESH_AND_CS, IEEE802154_CCA_MODE_ED_THRESH_OR_CS }
 IEEE802.15.4 CCA modes. More...
 
enum  ieee802154_rx_mode_t {
  IEEE802154_RX_AACK_DISABLED, IEEE802154_RX_AACK_ENABLED, IEEE802154_RX_AACK_FRAME_PENDING, IEEE802154_RX_PROMISC,
  IEEE802154_RX_WAIT_FOR_ACK
}
 RX mode configuration. More...
 

Functions

static int ieee802154_radio_write (ieee802154_dev_t *dev, const iolist_t *psdu)
 Shortcut to ieee802154_radio_ops::write. More...
 
static int ieee802154_radio_request_transmit (ieee802154_dev_t *dev)
 Shortcut to ieee802154_radio_ops::request_transmit. More...
 
static int ieee802154_radio_confirm_transmit (ieee802154_dev_t *dev, ieee802154_tx_info_t *info)
 Shortcut to ieee802154_radio_ops::confirm_transmit. More...
 
static int ieee802154_radio_len (ieee802154_dev_t *dev)
 Shortcut to ieee802154_radio_ops::len. More...
 
static int ieee802154_radio_read (ieee802154_dev_t *dev, void *buf, size_t size, ieee802154_rx_info_t *info)
 Shortcut to ieee802154_radio_ops::read. More...
 
static int ieee802154_radio_set_cca_threshold (ieee802154_dev_t *dev, int8_t threshold)
 Shortcut to ieee802154_radio_ops::set_cca_threshold. More...
 
static int ieee802154_radio_set_cca_mode (ieee802154_dev_t *dev, ieee802154_cca_mode_t mode)
 Shortcut to ieee802154_radio_ops::set_cca_mode. More...
 
static int ieee802154_radio_config_phy (ieee802154_dev_t *dev, const ieee802154_phy_conf_t *conf)
 Shortcut to ieee802154_radio_ops::config_phy. More...
 
static int ieee802154_radio_off (ieee802154_dev_t *dev)
 Shortcut to ieee802154_radio_ops::off. More...
 
static int ieee802154_radio_set_hw_addr_filter (ieee802154_dev_t *dev, const network_uint16_t *short_addr, const eui64_t *ext_addr, const uint16_t *pan_id)
 Shortcut to ieee802154_radio_ops::set_hw_addr_filter. More...
 
static int ieee802154_radio_set_frame_retrans (ieee802154_dev_t *dev, uint8_t retrans)
 Shortcut to ieee802154_radio_ops::set_frame_retrans. More...
 
static int ieee802154_radio_set_csma_params (ieee802154_dev_t *dev, const ieee802154_csma_be_t *bd, int8_t retries)
 Shortcut to ieee802154_radio_ops::set_csma_params. More...
 
static int ieee802154_radio_request_on (ieee802154_dev_t *dev)
 Shortcut to ieee802154_radio_ops::request_on. More...
 
static int ieee802154_radio_confirm_on (ieee802154_dev_t *dev)
 Shortcut to ieee802154_radio_ops::confirm_on. More...
 
static int ieee802154_radio_request_set_trx_state (ieee802154_dev_t *dev, ieee802154_trx_state_t state)
 Shortcut to ieee802154_radio_ops::request_set_trx_state. More...
 
static int ieee802154_radio_confirm_set_trx_state (ieee802154_dev_t *dev)
 Shortcut to ieee802154_radio_ops::confirm_set_trx_state. More...
 
static int ieee802154_radio_request_cca (ieee802154_dev_t *dev)
 Shortcut to ieee802154_radio_ops::request_cca. More...
 
static int ieee802154_radio_confirm_cca (ieee802154_dev_t *dev)
 Shortcut to ieee802154_radio_ops::confirm_cca. More...
 
static bool ieee802154_radio_has_irq_ack_timeout (ieee802154_dev_t *dev)
 Check if the device supports ACK timeout. More...
 
static bool ieee802154_radio_has_frame_retrans (ieee802154_dev_t *dev)
 Check if the device supports frame retransmissions (with CSMA-CA). More...
 
static bool ieee802154_radio_has_auto_csma (ieee802154_dev_t *dev)
 Check if the device supports Auto CSMA-CA for transmissions. More...
 
static bool ieee802154_radio_has_sub_ghz (ieee802154_dev_t *dev)
 Check if the device supports the IEEE802.15.4 Sub-GHz band. More...
 
static bool ieee802154_radio_has_24_ghz (ieee802154_dev_t *dev)
 Check if the device supports the IEEE802.15.4 2.4 GHz band. More...
 
static bool ieee802154_radio_has_irq_tx_done (ieee802154_dev_t *dev)
 Check if the device supports TX done interrupt. More...
 
static bool ieee802154_radio_has_irq_rx_start (ieee802154_dev_t *dev)
 Check if the device supports RX start interrupt. More...
 
static bool ieee802154_radio_has_irq_tx_start (ieee802154_dev_t *dev)
 Check if the device supports TX start interrupt. More...
 
static bool ieee802154_radio_has_irq_cca_done (ieee802154_dev_t *dev)
 Check if the device supports CCA done interrupt. More...
 
static bool ieee802154_radio_has_frame_retrans_info (ieee802154_dev_t *dev)
 Check if the device reports the number of retransmissions of the last TX procedure. More...
 
static int ieee802154_radio_set_rx_mode (ieee802154_dev_t *dev, ieee802154_rx_mode_t mode)
 Shortcut to ieee802154_radio_ops::set_rx_mode. More...
 
static void ieee802154_radio_cipher_set_key (ieee802154_sec_dev_t *dev, const uint8_t *key, uint8_t key_size)
 Shortcut to ieee802154_sec_dev_t::ieee802154_radio_cipher_ops_t::set_key. More...
 
static void ieee802154_radio_cipher_ecb (const ieee802154_sec_dev_t *dev, uint8_t *cipher, const uint8_t *plain, uint8_t nblocks)
 Shortcut to ieee802154_sec_dev_t::ieee802154_radio_cipher_ops_t::ecb. More...
 
static void ieee802154_radio_cipher_cbc (const ieee802154_sec_dev_t *dev, uint8_t *cipher, uint8_t *iv, const uint8_t *plain, uint8_t nblocks)
 Shortcut to ieee802154_sec_dev_t::ieee802154_radio_cipher_ops_t::cbc. More...
 

Typedef Documentation

◆ ieee802154_cb_t

typedef void(* ieee802154_cb_t) (ieee802154_dev_t *dev, ieee802154_trx_ev_t status)

Prototype of the IEEE802.15.4 device event callback.

Parameters
[in]devIEEE802.15.4 device descriptor
[in]statusthe status

Definition at line 295 of file radio.h.

Enumeration Type Documentation

◆ ieee802154_cca_mode_t

IEEE802.15.4 CCA modes.

Enumerator
IEEE802154_CCA_MODE_ED_THRESHOLD 

CCA using first mode (energy detection)

IEEE802154_CCA_MODE_CARRIER_SENSING 

CCA using second mode (carrier sensing)

IEEE802154_CCA_MODE_ED_THRESH_AND_CS 

CCA using third mode (energy detection AND carrier sensing)

IEEE802154_CCA_MODE_ED_THRESH_OR_CS 

CCA using third mode (energy detection OR carrier sensing)

Definition at line 319 of file radio.h.

◆ ieee802154_rf_caps_t

IEEE802.15.4 Radio capabilities.

These flags represent the hardware capabilities of a given device.

Enumerator
IEEE802154_CAP_FRAME_RETRANS 

the device supports frame retransmissions with CSMA-CA

The device supports sending with CSMA-CA and retransmissions. If the CSMA-CA fails, the device reports a TX_STATUS_MEDIUM_BUSY when calling ieee802154_radio_ops::confirm_transmit. In case CSMA-CA succeeds and the ACK frame is expected, the device reports a TX_STATUS_SUCCESS if the ACK frame is received during any retransmission attempt. Otherwise, it reports a TX_STATUS_NO_ACK

ACK frames are not indicated to the upper layer.

Note
it's implicit that a radio supports IEEE802154_CAP_AUTO_CSMA if this cap is available
IEEE802154_CAP_AUTO_CSMA 

the device supports Auto CSMA-CA

The device supports performing CSMA-CA before transmitting a frame. If CSMA-CA procedure succeeds, the device sends the frame and reports a TX_STATUS_SUCCESS when calling ieee802154_radio_ops::confirm_transmit. If it fails, the device reports TX_STATUS_MEDIUM_BUSY.

IEEE802154_CAP_IRQ_ACK_TIMEOUT 

the device support ACK timeout interrupt

The device will automatically attempt to receive and handle the ACK frame if expected. If the ACK frame is not received, the device reports TX_STATUS_NO_ACK when calling ieee802154_radio_ops::confirm_transmit. Otherwise, it reports TX_STATUS_SUCCESS.

The ACK frame is not indicated to the upper layer.

IEEE802154_CAP_24_GHZ 

the device supports the IEEE802.15.4 2.4 GHz band

It's assumed that IEEE802154_CAP_IRQ_TX_DONE is present.

IEEE802154_CAP_SUB_GHZ 

the device support the IEEE802.15.4 Sub GHz band

IEEE802154_CAP_IRQ_CRC_ERROR 

the device reports reception off frames with invalid CRC.

IEEE802154_CAP_IRQ_TX_DONE 

the device reports when the transmission is done

IEEE802154_CAP_IRQ_RX_START 

the device reports the start of a frame (SFD) when received.

IEEE802154_CAP_IRQ_TX_START 

the device reports the start of a frame (SFD) was sent.

IEEE802154_CAP_IRQ_CCA_DONE 

the device reports the end of the CCA procedure

IEEE802154_CAP_FRAME_RETRANS_INFO 

the device provides the number of retransmissions

It's assumed that IEEE802154_CAP_FRAME_RETRANS is present.

IEEE802154_CAP_REG_RETENTION 

the device retains all register values when off.

Definition at line 45 of file radio.h.

◆ ieee802154_rx_mode_t

RX mode configuration.

Enumerator
IEEE802154_RX_AACK_DISABLED 

Auto ACK is disabled.

IEEE802154_RX_AACK_ENABLED 

Auto ACK is enabled.

IEEE802154_RX_AACK_FRAME_PENDING 

Auto ACK is enabled and frame pending bit set in the next ACK frame.

IEEE802154_RX_PROMISC 

Radio is in promiscuous mode.

IEEE802154_RX_WAIT_FOR_ACK 

Radio is ready to receive ACK frames.

This mode is optional. If a radio decides to implement it, the radio should allow ACK frames (and block ACK frames in all other RX modes). Note that this mode cannot guarantee that only ACK frames will be received.

Expected to be implemented when either IEEE802154_CAP_FRAME_RETRANS or IEEE802154_CAP_IRQ_ACK_TIMEOUT is not there.

Definition at line 341 of file radio.h.

◆ ieee802154_trx_ev_t

IEEE802.15.4 Radio HAL events.

To follow the IEEE802.15.4 convention, an event that responds to a Request is a confirmation (Confirm). Otherwise an Indication.

Enumerator
IEEE802154_RADIO_INDICATION_RX_START 

the transceiver detected a valid SFD

This event is present if radio has IEEE802154_CAP_IRQ_RX_START cap.

IEEE802154_RADIO_INDICATION_CRC_ERROR 

the transceiver received a frame with an invalid crc.

The transceiver might not stay in IEEE802154_TRX_STATE_RX_ON after receiving an invalid CRC. Therefore the upper layer must set the transceiver state (ieee802154_radio_ops::request_set_trx_state). e.g.: IEEE802154_TRX_STATE_TRX_OFF or IEEE802154_TRX_STATE_TX_ON to stop listening or IEEE802154_TRX_STATE_RX_ON to keep listening.

IEEE802154_RADIO_INDICATION_TX_START 

the transceiver sent out a valid SFD

This event is present if radio has IEEE802154_CAP_IRQ_TX_START cap.

Note
The SFD of an outgoing ACK (AUTOACK) should not be indicated
IEEE802154_RADIO_INDICATION_RX_DONE 

the transceiver received a frame and lies in the internal framebuffer.

This indication should be generated only if CRC is valid and the frame passes the address matching filter (this includes ACK and Beacon frames). The latter only applies if the radio is not in promiscuous mode.

The transceiver or driver MUST handle the ACK reply if the Ack Request bit is set in the received frame and promiscuous mode is disabled.

The transceiver will be in a "FB Lock" state where no more frames are received. This is done in order to avoid overwriting the Frame Buffer with new frame arrivals. In order to leave this state, the upper layer must set the transceiver state (ieee802154_radio_ops::request_set_trx_state).

IEEE802154_RADIO_CONFIRM_TX_DONE 

the transceiver either finished sending a frame, the retransmission procedure or the channel activity detection prior transmission.

This event is present if radio has IEEE802154_CAP_IRQ_TX_DONE cap. The upper layer should immediately call ieee802154_radio_ops::confirm_transmit when on this event.

IEEE802154_RADIO_CONFIRM_CCA 

the CCA procedure finished

This event is present if radio has IEEE802154_CAP_IRQ_CCA_DONE.

Definition at line 189 of file radio.h.

◆ ieee802154_trx_state_t

IEEE802.15.4 transceiver states (not to confuse with device states)

Enumerator
IEEE802154_TRX_STATE_TRX_OFF 

the transceiver state is off

IEEE802154_TRX_STATE_RX_ON 

the transceiver is ready to receive/receiving frames

IEEE802154_TRX_STATE_TX_ON 

the transceiver is ready to transmit/transmitting a frame

Definition at line 168 of file radio.h.

◆ ieee802154_tx_status_t

Transmission status.

Enumerator
TX_STATUS_SUCCESS 

the transceiver successfully sent a frame.

Depending of the type of transmissions and available caps, this could mean one of the following:

If the device supports IEEE802154_CAP_FRAME_RETRANS or IEEE802154_CAP_IRQ_ACK_TIMEOUT this means either:

  • The frame was sent without ACK Req bit
  • The frame was sent with the ACK Req bit and a valid ACK was received.

Otherwise, this notifies that a frame was sent.

TX_STATUS_FRAME_PENDING 

the transceiver received a valid ACK with the frame pending bit

This status is present only if the device supports IEEE802154_CAP_FRAME_RETRANS or IEEE802154_CAP_IRQ_ACK_TIMEOUT.

TX_STATUS_NO_ACK 

the transceiver ran out of retransmission

This status is present only if the device supports IEEE802154_CAP_FRAME_RETRANS or IEEE802154_CAP_IRQ_ACK_TIMEOUT.

TX_STATUS_MEDIUM_BUSY 

the CSMA-CA algorithm or CCA failed to measure a clear channel

Definition at line 130 of file radio.h.

Function Documentation

◆ ieee802154_radio_cipher_cbc()

static void ieee802154_radio_cipher_cbc ( const ieee802154_sec_dev_t dev,
uint8_t *  cipher,
uint8_t *  iv,
const uint8_t *  plain,
uint8_t  nblocks 
)
inlinestatic

Shortcut to ieee802154_sec_dev_t::ieee802154_radio_cipher_ops_t::cbc.

Parameters
[in]devIEEE802.15.4 security device descriptor
[out]cipherOutput cipher blocks
[in]ivInitial vector to be XOR´ed to the first plain block
[in]plainInput plain blocks
[in]nblocksNumber of blocks

Definition at line 1268 of file radio.h.

◆ ieee802154_radio_cipher_ecb()

static void ieee802154_radio_cipher_ecb ( const ieee802154_sec_dev_t dev,
uint8_t *  cipher,
const uint8_t *  plain,
uint8_t  nblocks 
)
inlinestatic

Shortcut to ieee802154_sec_dev_t::ieee802154_radio_cipher_ops_t::ecb.

Parameters
[in]devIEEE802.15.4 security device descriptor
[out]cipherOutput cipher blocks
[in]plainInput plain blocks
[in]nblocksNumber of blocks

Definition at line 1253 of file radio.h.

◆ ieee802154_radio_cipher_set_key()

static void ieee802154_radio_cipher_set_key ( ieee802154_sec_dev_t dev,
const uint8_t *  key,
uint8_t  key_size 
)
inlinestatic

Shortcut to ieee802154_sec_dev_t::ieee802154_radio_cipher_ops_t::set_key.

Parameters
[in]devIEEE802.15.4 security device descriptor
[in]keyEncryption key
[in]key_sizeSize of the key in bytes

Definition at line 1239 of file radio.h.

◆ ieee802154_radio_config_phy()

static int ieee802154_radio_config_phy ( ieee802154_dev_t dev,
const ieee802154_phy_conf_t conf 
)
inlinestatic

Shortcut to ieee802154_radio_ops::config_phy.

Precondition
the transceiver state is IEEE802154_TRX_STATE_TRX_OFF
Parameters
[in]devIEEE802.15.4 device descriptor
[in]confthe PHY configuration
Returns
result of ieee802154_radio_ops::config_phy

Definition at line 901 of file radio.h.

◆ ieee802154_radio_confirm_cca()

static int ieee802154_radio_confirm_cca ( ieee802154_dev_t dev)
inlinestatic

Shortcut to ieee802154_radio_ops::confirm_cca.

Parameters
[in]devIEEE802.15.4 device descriptor
Returns
result of ieee802154_radio_ops::confirm_cca

Definition at line 1051 of file radio.h.

◆ ieee802154_radio_confirm_on()

static int ieee802154_radio_confirm_on ( ieee802154_dev_t dev)
inlinestatic

Shortcut to ieee802154_radio_ops::confirm_on.

Parameters
[in]devIEEE802.15.4 device descriptor
Returns
result of ieee802154_radio_ops::confirm_on

Definition at line 1001 of file radio.h.

◆ ieee802154_radio_confirm_set_trx_state()

static int ieee802154_radio_confirm_set_trx_state ( ieee802154_dev_t dev)
inlinestatic

Shortcut to ieee802154_radio_ops::confirm_set_trx_state.

Parameters
[in]devIEEE802.15.4 device descriptor
Returns
result of ieee802154_radio_ops::confirm_set_trx_state

Definition at line 1027 of file radio.h.

◆ ieee802154_radio_confirm_transmit()

static int ieee802154_radio_confirm_transmit ( ieee802154_dev_t dev,
ieee802154_tx_info_t info 
)
inlinestatic

Shortcut to ieee802154_radio_ops::confirm_transmit.

Parameters
[in]devIEEE802.15.4 device descriptor
[out]infothe TX information
Returns
result of ieee802154_radio_ops::confirm_transmit

Definition at line 826 of file radio.h.

◆ ieee802154_radio_has_24_ghz()

static bool ieee802154_radio_has_24_ghz ( ieee802154_dev_t dev)
inlinestatic

Check if the device supports the IEEE802.15.4 2.4 GHz band.

Internally this function calls ieee802154_radio_ops::get_cap with IEEE802154_CAP_24_GHZ.

Parameters
[in]devIEEE802.15.4 device descriptor
Returns
true if the device has support
false otherwise

Definition at line 1131 of file radio.h.

◆ ieee802154_radio_has_auto_csma()

static bool ieee802154_radio_has_auto_csma ( ieee802154_dev_t dev)
inlinestatic

Check if the device supports Auto CSMA-CA for transmissions.

Internally this function calls ieee802154_radio_ops::get_cap with IEEE802154_CAP_AUTO_CSMA.

Parameters
[in]devIEEE802.15.4 device descriptor
Returns
true if the device has support
false otherwise

Definition at line 1099 of file radio.h.

◆ ieee802154_radio_has_frame_retrans()

static bool ieee802154_radio_has_frame_retrans ( ieee802154_dev_t dev)
inlinestatic

Check if the device supports frame retransmissions (with CSMA-CA).

Internally this function calls ieee802154_radio_ops::get_cap with IEEE802154_CAP_FRAME_RETRANS.

Parameters
[in]devIEEE802.15.4 device descriptor
Returns
true if the device has support
false otherwise

Definition at line 1083 of file radio.h.

◆ ieee802154_radio_has_frame_retrans_info()

static bool ieee802154_radio_has_frame_retrans_info ( ieee802154_dev_t dev)
inlinestatic

Check if the device reports the number of retransmissions of the last TX procedure.

Internally this function calls ieee802154_radio_ops::get_cap with IEEE802154_CAP_FRAME_RETRANS_INFO.

Parameters
[in]devIEEE802.15.4 device descriptor
Returns
true if the device has support
false otherwise

Definition at line 1212 of file radio.h.

◆ ieee802154_radio_has_irq_ack_timeout()

static bool ieee802154_radio_has_irq_ack_timeout ( ieee802154_dev_t dev)
inlinestatic

Check if the device supports ACK timeout.

Internally this function calls ieee802154_radio_ops::get_cap with IEEE802154_CAP_IRQ_ACK_TIMEOUT.

Parameters
[in]devIEEE802.15.4 device descriptor
Returns
true if the device has support
false otherwise

Definition at line 1067 of file radio.h.

◆ ieee802154_radio_has_irq_cca_done()

static bool ieee802154_radio_has_irq_cca_done ( ieee802154_dev_t dev)
inlinestatic

Check if the device supports CCA done interrupt.

Internally this function calls ieee802154_radio_ops::get_cap with IEEE802154_CAP_IRQ_CCA_DONE.

Parameters
[in]devIEEE802.15.4 device descriptor
Returns
true if the device has support
false otherwise

Definition at line 1195 of file radio.h.

◆ ieee802154_radio_has_irq_rx_start()

static bool ieee802154_radio_has_irq_rx_start ( ieee802154_dev_t dev)
inlinestatic

Check if the device supports RX start interrupt.

Internally this function calls ieee802154_radio_ops::get_cap with IEEE802154_CAP_IRQ_RX_START.

Parameters
[in]devIEEE802.15.4 device descriptor
Returns
true if the device has support
false otherwise

Definition at line 1163 of file radio.h.

◆ ieee802154_radio_has_irq_tx_done()

static bool ieee802154_radio_has_irq_tx_done ( ieee802154_dev_t dev)
inlinestatic

Check if the device supports TX done interrupt.

Internally this function calls ieee802154_radio_ops::get_cap with IEEE802154_CAP_IRQ_TX_DONE.

Parameters
[in]devIEEE802.15.4 device descriptor
Returns
true if the device has support
false otherwise

Definition at line 1147 of file radio.h.

◆ ieee802154_radio_has_irq_tx_start()

static bool ieee802154_radio_has_irq_tx_start ( ieee802154_dev_t dev)
inlinestatic

Check if the device supports TX start interrupt.

Internally this function calls ieee802154_radio_ops::get_cap with IEEE802154_CAP_IRQ_TX_START.

Parameters
[in]devIEEE802.15.4 device descriptor
Returns
true if the device has support
false otherwise

Definition at line 1179 of file radio.h.

◆ ieee802154_radio_has_sub_ghz()

static bool ieee802154_radio_has_sub_ghz ( ieee802154_dev_t dev)
inlinestatic

Check if the device supports the IEEE802.15.4 Sub-GHz band.

Internally this function calls ieee802154_radio_ops::get_cap with IEEE802154_CAP_SUB_GHZ.

Parameters
[in]devIEEE802.15.4 device descriptor
Returns
true if the device has support
false otherwise

Definition at line 1115 of file radio.h.

◆ ieee802154_radio_len()

static int ieee802154_radio_len ( ieee802154_dev_t dev)
inlinestatic

Shortcut to ieee802154_radio_ops::len.

Parameters
[in]devIEEE802.15.4 device descriptor
Returns
result of ieee802154_radio_ops::len

Definition at line 839 of file radio.h.

◆ ieee802154_radio_off()

static int ieee802154_radio_off ( ieee802154_dev_t dev)
inlinestatic

Shortcut to ieee802154_radio_ops::off.

Parameters
[in]devIEEE802.15.4 device descriptor
Postcondition
the transceiver state is IEEE802154_TRX_STATE_TRX_OFF
Returns
result of ieee802154_radio_ops::off

Definition at line 916 of file radio.h.

◆ ieee802154_radio_read()

static int ieee802154_radio_read ( ieee802154_dev_t dev,
void *  buf,
size_t  size,
ieee802154_rx_info_t info 
)
inlinestatic

Shortcut to ieee802154_radio_ops::read.

Parameters
[in]devIEEE802.15.4 device descriptor
[out]bufbuffer to write the received frame into.
[in]sizesize of buf
[in]infoinformation of the received frame (LQI, RSSI). Can be NULL if this information is not needed.
Returns
result of ieee802154_radio_ops::read

Definition at line 855 of file radio.h.

◆ ieee802154_radio_request_cca()

static int ieee802154_radio_request_cca ( ieee802154_dev_t dev)
inlinestatic

Shortcut to ieee802154_radio_ops::request_cca.

Parameters
[in]devIEEE802.15.4 device descriptor
Returns
result of ieee802154_radio_ops::request_cca

Definition at line 1039 of file radio.h.

◆ ieee802154_radio_request_on()

static int ieee802154_radio_request_on ( ieee802154_dev_t dev)
inlinestatic

Shortcut to ieee802154_radio_ops::request_on.

Parameters
[in]devIEEE802.15.4 device descriptor
Returns
result of ieee802154_radio_ops::request_on

Definition at line 989 of file radio.h.

◆ ieee802154_radio_request_set_trx_state()

static int ieee802154_radio_request_set_trx_state ( ieee802154_dev_t dev,
ieee802154_trx_state_t  state 
)
inlinestatic

Shortcut to ieee802154_radio_ops::request_set_trx_state.

Parameters
[in]devIEEE802.15.4 device descriptor
[in]statethe new state
Returns
result of ieee802154_radio_ops::request_set_trx_state

Definition at line 1014 of file radio.h.

◆ ieee802154_radio_request_transmit()

static int ieee802154_radio_request_transmit ( ieee802154_dev_t dev)
inlinestatic

Shortcut to ieee802154_radio_ops::request_transmit.

Parameters
[in]devIEEE802.15.4 device descriptor
Returns
result of ieee802154_radio_ops::request_transmit

Definition at line 813 of file radio.h.

◆ ieee802154_radio_set_cca_mode()

static int ieee802154_radio_set_cca_mode ( ieee802154_dev_t dev,
ieee802154_cca_mode_t  mode 
)
inlinestatic

Shortcut to ieee802154_radio_ops::set_cca_mode.

Parameters
[in]devIEEE802.15.4 device descriptor
[in]modethe CCA mode
Returns
result of ieee802154_radio_ops::set_cca_mode

Definition at line 885 of file radio.h.

◆ ieee802154_radio_set_cca_threshold()

static int ieee802154_radio_set_cca_threshold ( ieee802154_dev_t dev,
int8_t  threshold 
)
inlinestatic

Shortcut to ieee802154_radio_ops::set_cca_threshold.

Parameters
[in]devIEEE802.15.4 device descriptor
[in]thresholdthe threshold in dBm
Returns
result of ieee802154_radio_ops::set_cca_threshold

Definition at line 871 of file radio.h.

◆ ieee802154_radio_set_csma_params()

static int ieee802154_radio_set_csma_params ( ieee802154_dev_t dev,
const ieee802154_csma_be_t bd,
int8_t  retries 
)
inlinestatic

Shortcut to ieee802154_radio_ops::set_csma_params.

Precondition
the device is on
the device supports frame retransmissions (ieee802154_radio_has_frame_retrans() == true)
Parameters
[in]devIEEE802.15.4 device descriptor
[in]bdparameters of the exponential backoff
[in]retriesnumber of CSMA-CA retries. If restries < 0, retransmissions with CSMA-CA are disabled
Returns
result of ieee802154_radio_ops::set_csma_params

Definition at line 975 of file radio.h.

◆ ieee802154_radio_set_frame_retrans()

static int ieee802154_radio_set_frame_retrans ( ieee802154_dev_t dev,
uint8_t  retrans 
)
inlinestatic

Shortcut to ieee802154_radio_ops::set_frame_retrans.

Precondition
the device is on
the device supports frame retransmissions (ieee802154_radio_has_frame_retrans() == true)
Parameters
[in]devIEEE802.15.4 device descriptor
[in]retransthe number of retransmissions
Returns
result of ieee802154_radio_ops::set_frame_retrans

Definition at line 955 of file radio.h.

◆ ieee802154_radio_set_hw_addr_filter()

static int ieee802154_radio_set_hw_addr_filter ( ieee802154_dev_t dev,
const network_uint16_t short_addr,
const eui64_t ext_addr,
const uint16_t *  pan_id 
)
inlinestatic

Shortcut to ieee802154_radio_ops::set_hw_addr_filter.

Precondition
the device is on
Parameters
[in]devIEEE802.15.4 device descriptor
[in]short_addrthe IEEE802.15.4 short address. If NULL, the short address is not altered..
[in]ext_addrthe IEEE802.15.4 extended address (Network Byte Order). If NULL, the extended address is not altered.
[in]pan_idthe IEEE802.15.4 PAN ID. If NULL, the PAN ID is not altered.
Returns
result of ieee802154_radio_ops::set_hw_addr_filter

Definition at line 935 of file radio.h.

◆ ieee802154_radio_set_rx_mode()

static int ieee802154_radio_set_rx_mode ( ieee802154_dev_t dev,
ieee802154_rx_mode_t  mode 
)
inlinestatic

Shortcut to ieee802154_radio_ops::set_rx_mode.

Parameters
[in]devIEEE802.15.4 device descriptor
[in]modeRX mode
Returns
result of ieee802154_radio_ops::set_rx_mode

Definition at line 1226 of file radio.h.

◆ ieee802154_radio_write()

static int ieee802154_radio_write ( ieee802154_dev_t dev,
const iolist_t psdu 
)
inlinestatic

Shortcut to ieee802154_radio_ops::write.

Parameters
[in]devIEEE802.15.4 device descriptor
[in]psduPSDU frame to be sent
Returns
result of ieee802154_radio_ops::write

Definition at line 801 of file radio.h.