Zephyr API Documentation
3.7.0
A Scalable Open Source RTOS
|
Public IEEE 802.15.4 Driver API. More...
#include <zephyr/device.h>
#include <zephyr/net/net_if.h>
#include <zephyr/net/net_pkt.h>
#include <zephyr/net/net_time.h>
#include <zephyr/net/ieee802154.h>
#include <zephyr/net/ieee802154_ie.h>
#include <zephyr/sys/util.h>
Go to the source code of this file.
Data Structures | |
struct | ieee802154_phy_channel_range |
Represents a supported channel range, see ieee802154_phy_supported_channels. More... | |
struct | ieee802154_phy_supported_channels |
Represents a list channels supported by a driver for a given interface, see IEEE802154_ATTR_PHY_SUPPORTED_CHANNEL_RANGES. More... | |
struct | ieee802154_filter |
Filter value, see ieee802154_radio_api::filter. More... | |
struct | ieee802154_key |
Key configuration for transmit security offloading, see IEEE802154_CONFIG_MAC_KEYS. More... | |
struct | ieee802154_config |
IEEE 802.15.4 driver configuration data. More... | |
struct | ieee802154_attr_value |
IEEE 802.15.4 driver attribute values. More... | |
struct | ieee802154_radio_api |
IEEE 802.15.4 driver interface API. More... | |
Macros | |
IEEE 802.15.4-2020, Section 6: MAC functional description | |
#define | IEEE802154_PHY_SYMBOLS_PER_SECOND(symbol_period_ns) (NSEC_PER_SEC / symbol_period_ns) |
The symbol period (and therefore symbol rate) is defined in section 6.1: "Some of the timing parameters in definition of the MAC are in units of PHY symbols. | |
IEEE 802.15.4-2020, Section 8: MAC services | |
#define | IEEE802154_MAC_A_BASE_SLOT_DURATION 60U |
The number of PHY symbols forming a superframe slot when the superframe order is equal to zero, see sections 8.4.2, table 8-93, aBaseSlotDuration and section 6.2.1. | |
#define | IEEE802154_MAC_A_NUM_SUPERFRAME_SLOTS 16U |
The number of slots contained in any superframe, see section 8.4.2, table 8-93, aNumSuperframeSlots. | |
#define | IEEE802154_MAC_A_BASE_SUPERFRAME_DURATION (IEEE802154_MAC_A_BASE_SLOT_DURATION * IEEE802154_MAC_A_NUM_SUPERFRAME_SLOTS) |
The number of PHY symbols forming a superframe when the superframe order is equal to zero, see section 8.4.2, table 8-93, aBaseSuperframeDuration. | |
#define | IEEE802154_MAC_A_UNIT_BACKOFF_PERIOD(turnaround_time) (turnaround_time + IEEE802154_PHY_A_CCA_TIME) |
MAC PIB attribute aUnitBackoffPeriod, see section 8.4.2, table 8-93, in symbol periods, valid for all PHYs except SUN PHY in the 920 MHz band. | |
#define | IEEE802154_MAC_RESPONSE_WAIT_TIME_DEFAULT 32U |
Default macResponseWaitTime in multiples of aBaseSuperframeDuration as defined in section 8.4.3.1, table 8-94. | |
IEEE 802.15.4-2020, Section 11: PHY services | |
#define | IEEE802154_PHY_A_TURNAROUND_TIME_DEFAULT 12U |
Default PHY PIB attribute aTurnaroundTime, in PHY symbols, see section 11.3, table 11-1. | |
#define | IEEE802154_PHY_A_TURNAROUND_TIME_1MS(symbol_period_ns) DIV_ROUND_UP(NSEC_PER_MSEC, symbol_period_ns) |
PHY PIB attribute aTurnaroundTime for SUN, RS-GFSK, TVWS, and LECIM FSK PHY, in PHY symbols, see section 11.3, table 11-1. | |
#define | IEEE802154_PHY_A_CCA_TIME 8U |
PHY PIB attribute aCcaTime, in PHY symbols, all PHYs except for SUN O-QPSK, see section 11.3, table 11-1. | |
IEEE 802.15.4-2020, Section 12: O-QPSK PHY | |
#define | IEEE802154_PHY_OQPSK_868MHZ_SYMBOL_PERIOD_NS 40000LL |
O-QPSK 868Mhz band symbol period, see section 12.3.3. | |
#define | IEEE802154_PHY_OQPSK_780_TO_2450MHZ_SYMBOL_PERIOD_NS 16000LL |
O-QPSK 780MHz, 915MHz, 2380MHz and 2450MHz bands symbol period, see section 12.3.3. | |
IEEE 802.15.4-2020, Section 13: BPSK PHY | |
#define | IEEE802154_PHY_BPSK_868MHZ_SYMBOL_PERIOD_NS 50000LL |
BPSK 868MHz band symbol period, see section 13.3.3. | |
#define | IEEE802154_PHY_BPSK_915MHZ_SYMBOL_PERIOD_NS 25000LL |
BPSK 915MHz band symbol period, see section 13.3.3. | |
IEEE 802.15.4-2020, Section 19: SUN FSK PHY | |
#define | IEEE802154_PHY_SUN_FSK_863MHZ_915MHZ_SYMBOL_PERIOD_NS 20000LL |
SUN FSK 863Mhz and 915MHz band symbol periods, see section 19.1, table 19-1. | |
#define | IEEE802154_PHY_SUN_FSK_PHR_LEN 2 |
SUN FSK PHY header length, in bytes, see section 19.2.4. | |
Functions | |
IEEE 802.15.4 driver utils | |
static bool | ieee802154_is_ar_flag_set (struct net_buf *frag) |
Check if the AR flag is set on the frame inside the given Network Packet Library. | |
IEEE 802.15.4 driver callbacks | |
enum net_verdict | ieee802154_handle_ack (struct net_if *iface, struct net_pkt *pkt) |
IEEE 802.15.4 driver ACK handling callback into L2 that drivers must call when receiving an ACK package. | |
void | ieee802154_init (struct net_if *iface) |
IEEE 802.15.4 driver initialization callback into L2 called by drivers to initialize the active L2 stack for a given interface. | |
IEEE 802.15.4-2020, Section 15: HRP UWB PHY | |
For HRP UWB the symbol period is derived from the preamble symbol period (T_psym), see section 11.3, table 11-1 and section 15.2.5, table 15-4 (confirmed in IEEE 802.15.4z, section 15.1). Choosing among those periods cannot be done based on channel page and channel alone. The mean pulse repetition frequency must also be known, see the 'UwbPrf' parameter of the MCPS-DATA.request primitive (section 8.3.2, table 8-88) and the preamble parameters for HRP-ERDEV length 91 codes (IEEE 802.15.4z, section 15.2.6.2, table 15-7b). | |
#define | IEEE802154_PHY_HRP_UWB_PRF4_TPSYM_SYMBOL_PERIOD_NS 3974.36F |
Nominal PRF 4MHz symbol period. | |
#define | IEEE802154_PHY_HRP_UWB_PRF16_TPSYM_SYMBOL_PERIOD_NS 993.59F |
Nominal PRF 16MHz symbol period. | |
#define | IEEE802154_PHY_HRP_UWB_PRF64_TPSYM_SYMBOL_PERIOD_NS 1017.63F |
Nominal PRF 64MHz symbol period. | |
#define | IEEE802154_PHY_HRP_UWB_ERDEV_TPSYM_SYMBOL_PERIOD_NS 729.17F |
ERDEV symbol period. | |
#define | IEEE802154_PHY_HRP_UWB_RDEV |
RDEV device mask. | |
#define | IEEE802154_PHY_HRP_UWB_ERDEV |
ERDEV device mask. | |
enum | ieee802154_phy_hrp_uwb_nominal_prf { IEEE802154_PHY_HRP_UWB_PRF_OFF = 0 , IEEE802154_PHY_HRP_UWB_NOMINAL_4_M = BIT(0) , IEEE802154_PHY_HRP_UWB_NOMINAL_16_M = BIT(1) , IEEE802154_PHY_HRP_UWB_NOMINAL_64_M = BIT(2) , IEEE802154_PHY_HRP_UWB_NOMINAL_64_M_BPRF = BIT(3) , IEEE802154_PHY_HRP_UWB_NOMINAL_128_M_HPRF = BIT(4) , IEEE802154_PHY_HRP_UWB_NOMINAL_256_M_HPRF = BIT(5) } |
represents the nominal pulse rate frequency of an HRP UWB PHY More... | |
Public IEEE 802.15.4 Driver API.