Zephyr API Documentation 4.4.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
ieee802154_radio.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2016 Intel Corporation.
3 * Copyright (c) 2023 F. Grandel, Zephyr Project
4 *
5 * SPDX-License-Identifier: Apache-2.0
6 */
7
14
15#ifndef ZEPHYR_INCLUDE_NET_IEEE802154_RADIO_H_
16#define ZEPHYR_INCLUDE_NET_IEEE802154_RADIO_H_
17
18#include <zephyr/device.h>
19#include <zephyr/net/net_if.h>
20#include <zephyr/net/net_pkt.h>
21#include <zephyr/net/net_time.h>
24#include <zephyr/sys/util.h>
25
26#ifdef __cplusplus
27extern "C" {
28#endif
29
65
70
84#define IEEE802154_PHY_SYMBOLS_PER_SECOND(symbol_period_ns) (NSEC_PER_SEC / symbol_period_ns)
85
87
88
93
99#define IEEE802154_MAC_A_BASE_SLOT_DURATION 60U
100
105#define IEEE802154_MAC_A_NUM_SUPERFRAME_SLOTS 16U
106
111#define IEEE802154_MAC_A_BASE_SUPERFRAME_DURATION \
112 (IEEE802154_MAC_A_BASE_SLOT_DURATION * IEEE802154_MAC_A_NUM_SUPERFRAME_SLOTS)
113
118#define IEEE802154_MAC_A_UNIT_BACKOFF_PERIOD(turnaround_time) \
119 (turnaround_time + IEEE802154_PHY_A_CCA_TIME)
120
125#define IEEE802154_MAC_RESPONSE_WAIT_TIME_DEFAULT 32U
126
128
129
134
230
239
256
282#define IEEE802154_DEFINE_PHY_SUPPORTED_CHANNELS(drv_attr, from, to) \
283 static const struct { \
284 const struct ieee802154_phy_channel_range phy_channel_range; \
285 const struct ieee802154_phy_supported_channels phy_supported_channels; \
286 } drv_attr = { \
287 .phy_channel_range = {.from_channel = (from), .to_channel = (to)}, \
288 .phy_supported_channels = \
289 { \
290 .ranges = &drv_attr.phy_channel_range, \
291 .num_ranges = 1U, \
292 }, \
293 }
294
296
297
302
307#define IEEE802154_PHY_A_TURNAROUND_TIME_DEFAULT 12U
308
313#define IEEE802154_PHY_A_TURNAROUND_TIME_1MS(symbol_period_ns) \
314 DIV_ROUND_UP(NSEC_PER_MSEC, symbol_period_ns)
315
320#define IEEE802154_PHY_A_CCA_TIME 8U
321
323
324
325
330
332#define IEEE802154_PHY_OQPSK_868MHZ_SYMBOL_PERIOD_NS 40000LL
333
338#define IEEE802154_PHY_OQPSK_780_TO_2450MHZ_SYMBOL_PERIOD_NS 16000LL
339
341
342
347
349#define IEEE802154_PHY_BPSK_868MHZ_SYMBOL_PERIOD_NS 50000LL
350
352#define IEEE802154_PHY_BPSK_915MHZ_SYMBOL_PERIOD_NS 25000LL
353
355
356
370
372#define IEEE802154_PHY_HRP_UWB_PRF4_TPSYM_SYMBOL_PERIOD_NS 3974.36F
374#define IEEE802154_PHY_HRP_UWB_PRF16_TPSYM_SYMBOL_PERIOD_NS 993.59F
376#define IEEE802154_PHY_HRP_UWB_PRF64_TPSYM_SYMBOL_PERIOD_NS 1017.63F
378#define IEEE802154_PHY_HRP_UWB_ERDEV_TPSYM_SYMBOL_PERIOD_NS 729.17F
379
397
399#define IEEE802154_PHY_HRP_UWB_RDEV \
400 (IEEE802154_PHY_HRP_UWB_NOMINAL_4_M | IEEE802154_PHY_HRP_UWB_NOMINAL_16_M | \
401 IEEE802154_PHY_HRP_UWB_NOMINAL_64_M)
402
404#define IEEE802154_PHY_HRP_UWB_ERDEV \
405 (IEEE802154_PHY_HRP_UWB_NOMINAL_64_M_BPRF | IEEE802154_PHY_HRP_UWB_NOMINAL_128_M_HPRF | \
406 IEEE802154_PHY_HRP_UWB_NOMINAL_256_M_HPRF)
407
409
410
415
417#define IEEE802154_PHY_SUN_FSK_863MHZ_915MHZ_SYMBOL_PERIOD_NS 20000LL
418
420#define IEEE802154_PHY_SUN_FSK_PHR_LEN 2
421
423
428
438
439 /*
440 * PHY capabilities
441 *
442 * The following capabilities describe features of the underlying radio
443 * hardware (PHY/L1).
444 */
445
448
449 /*
450 * MAC offloading capabilities (optional)
451 *
452 * The following MAC/L2 features may optionally be offloaded to
453 * specialized hardware or proprietary driver firmware ("hard MAC").
454 *
455 * L2 implementations will have to provide a "soft MAC" fallback for
456 * these features in case the driver does not support them natively.
457 *
458 * Note: Some of these offloading capabilities may be mandatory in
459 * practice to stay within timing requirements of certain IEEE 802.15.4
460 * protocols, e.g. CPUs may not be fast enough to send ACKs within the
461 * required delays in the 2.4 GHz band without hard MAC support.
462 */
463
466
469
472
475
478
481
484
487
513
516
519
522
535
536 /* Note: Update also IEEE802154_HW_CAPS_BITS_COMMON_COUNT when changing
537 * the ieee802154_hw_caps type.
538 */
539};
540
542#define IEEE802154_HW_CAPS_BITS_COMMON_COUNT (14)
543
545#define IEEE802154_HW_CAPS_BITS_PRIV_START IEEE802154_HW_CAPS_BITS_COMMON_COUNT
546
555
571
587
589typedef void (*energy_scan_done_cb_t)(const struct device *dev,
590 int16_t max_ed);
591
593typedef void (*ieee802154_event_cb_t)(const struct device *dev,
594 enum ieee802154_event evt,
595 void *event_params);
596
608
625
668
679
1133
1138#define IEEE802154_CONFIG_RX_SLOT_NONE -1LL
1139
1148#define IEEE802154_CONFIG_RX_SLOT_OFF 0LL
1149
1292
1328
1343 union {
1344 /* TODO: Implement configuration of phyCurrentPage once drivers
1345 * need to support channel page switching at runtime.
1346 */
1364
1401
1402 /* TODO: Allow the PRF to be configured for each TX call once
1403 * drivers need to support PRF switching at runtime.
1404 */
1417 };
1418};
1419
1435 enum ieee802154_attr attr,
1436 const enum ieee802154_phy_channel_page phy_supported_channel_page,
1437 const struct ieee802154_phy_supported_channels *phy_supported_channels,
1438 struct ieee802154_attr_value *value)
1439{
1440 switch (attr) {
1442 value->phy_supported_channel_pages = phy_supported_channel_page;
1443 return 0;
1444
1446 value->phy_supported_channels = phy_supported_channels;
1447 return 0;
1448
1449 default:
1450 return -ENOENT;
1451 }
1452}
1453
1537 struct net_if_api iface_api;
1538
1550 enum ieee802154_hw_caps (*get_capabilities)(const struct device *dev);
1551
1568 int (*cca)(const struct device *dev);
1569
1592 int (*set_channel)(const struct device *dev, uint16_t channel);
1593
1617 int (*filter)(const struct device *dev,
1618 bool set,
1619 enum ieee802154_filter_type type,
1620 const struct ieee802154_filter *filter);
1621
1638 int (*set_txpower)(const struct device *dev, int16_t dbm);
1639
1732 int (*tx)(const struct device *dev, enum ieee802154_tx_mode mode,
1733 struct net_pkt *pkt, struct net_buf *frag);
1734
1756 int (*start)(const struct device *dev);
1757
1780 int (*stop)(const struct device *dev);
1781
1782#if defined(CONFIG_IEEE802154_CARRIER_FUNCTIONS)
1802 int (*continuous_carrier)(const struct device *dev);
1803
1825 int (*modulated_carrier)(const struct device *dev, const uint8_t *data);
1826#endif /* CONFIG_IEEE802154_CARRIER_FUNCTIONS */
1827
1863 int (*configure)(const struct device *dev,
1864 enum ieee802154_config_type type,
1865 const struct ieee802154_config *config);
1866
1891 int (*ed_scan)(const struct device *dev,
1892 uint16_t duration,
1893 energy_scan_done_cb_t done_cb);
1894
1912 net_time_t (*get_time)(const struct device *dev);
1913
1934 uint8_t (*get_sch_acc)(const struct device *dev);
1935
1957 int (*attr_get)(const struct device *dev,
1958 enum ieee802154_attr attr,
1959 struct ieee802154_attr_value *value);
1960};
1961
1962/* Make sure that the network interface API is properly setup inside
1963 * IEEE 802.15.4 driver API struct (it is the first one).
1964 */
1965BUILD_ASSERT(offsetof(struct ieee802154_radio_api, iface_api) == 0);
1966
1968
1973
1975#define IEEE802154_AR_FLAG_SET (0x20)
1977
1988static inline bool ieee802154_is_ar_flag_set(struct net_buf *frag)
1989{
1990 return (*frag->data & IEEE802154_AR_FLAG_SET);
1991}
1992
1994
1999
2000/* TODO: Fix drivers to either unref the packet before they return NET_OK or to
2001 * return NET_CONTINUE instead. See note below.
2002 */
2025extern enum net_verdict ieee802154_handle_ack(struct net_if *iface, struct net_pkt *pkt);
2026
2040#ifndef CONFIG_IEEE802154_RAW_MODE
2041extern void ieee802154_init(struct net_if *iface);
2042#else
2043#define ieee802154_init(_iface_)
2044#endif /* CONFIG_IEEE802154_RAW_MODE */
2045
2047
2048#ifdef __cplusplus
2049}
2050#endif
2051
2055
2056#endif /* ZEPHYR_INCLUDE_NET_IEEE802154_RADIO_H_ */
ieee802154_rx_fail_reason
RX failed event reasons, see IEEE802154_EVENT_RX_FAILED.
Definition ieee802154_radio.h:573
ieee802154_phy_hrp_uwb_nominal_prf
represents the nominal pulse rate frequency of an HRP UWB PHY
Definition ieee802154_radio.h:381
ieee802154_event
Driver events, see IEEE802154_CONFIG_EVENT_HANDLER.
Definition ieee802154_radio.h:557
ieee802154_config_type
IEEE 802.15.4 driver configuration types.
Definition ieee802154_radio.h:681
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 packa...
void(* ieee802154_event_cb_t)(const struct device *dev, enum ieee802154_event evt, void *event_params)
Driver event callback.
Definition ieee802154_radio.h:593
void(* energy_scan_done_cb_t)(const struct device *dev, int16_t max_ed)
Energy scan callback.
Definition ieee802154_radio.h:589
ieee802154_filter_type
Filter type, see ieee802154_radio_api::filter.
Definition ieee802154_radio.h:548
ieee802154_tx_mode
IEEE 802.15.4 Transmission mode.
Definition ieee802154_radio.h:627
ieee802154_fpb_mode
IEEE 802.15.4 Frame Pending Bit table address matching mode.
Definition ieee802154_radio.h:670
ieee802154_phy_channel_page
PHY channel pages, see section 10.1.3.
Definition ieee802154_radio.h:169
void ieee802154_init(struct net_if *iface)
IEEE 802.15.4 driver initialization callback into L2 called by drivers to initialize the active L2 st...
ieee802154_attr
IEEE 802.15.4 driver attributes.
Definition ieee802154_radio.h:1299
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.
Definition ieee802154_radio.h:1988
static int ieee802154_attr_get_channel_page_and_range(enum ieee802154_attr attr, const enum ieee802154_phy_channel_page phy_supported_channel_page, const struct ieee802154_phy_supported_channels *phy_supported_channels, struct ieee802154_attr_value *value)
Helper function to handle channel page and range to be called from drivers' attr_get() implementation...
Definition ieee802154_radio.h:1434
ieee802154_hw_caps
IEEE 802.15.4 driver capabilities.
Definition ieee802154_radio.h:437
@ IEEE802154_RX_FAIL_INVALID_FCS
Frame had invalid checksum.
Definition ieee802154_radio.h:577
@ IEEE802154_RX_FAIL_OTHER
General reason.
Definition ieee802154_radio.h:585
@ IEEE802154_RX_FAIL_ABORT
Aborted.
Definition ieee802154_radio.h:583
@ IEEE802154_RX_FAIL_NO_BUFS
No buffer available.
Definition ieee802154_radio.h:581
@ IEEE802154_RX_FAIL_ADDR_FILTERED
Address did not match.
Definition ieee802154_radio.h:579
@ IEEE802154_RX_FAIL_NOT_RECEIVED
Nothing received.
Definition ieee802154_radio.h:575
@ IEEE802154_PHY_HRP_UWB_NOMINAL_64_M
Definition ieee802154_radio.h:386
@ IEEE802154_PHY_HRP_UWB_PRF_OFF
standard modes, see section 8.3.2, table 8-88.
Definition ieee802154_radio.h:383
@ IEEE802154_PHY_HRP_UWB_NOMINAL_4_M
Definition ieee802154_radio.h:384
@ IEEE802154_PHY_HRP_UWB_NOMINAL_256_M_HPRF
Definition ieee802154_radio.h:395
@ IEEE802154_PHY_HRP_UWB_NOMINAL_64_M_BPRF
enhanced ranging device (ERDEV) modes not specified in table 8-88, see IEEE 802.15....
Definition ieee802154_radio.h:393
@ IEEE802154_PHY_HRP_UWB_NOMINAL_16_M
Definition ieee802154_radio.h:385
@ IEEE802154_PHY_HRP_UWB_NOMINAL_128_M_HPRF
Definition ieee802154_radio.h:394
@ IEEE802154_EVENT_TX_STARTED
Data transmission started.
Definition ieee802154_radio.h:559
@ IEEE802154_EVENT_RX_FAILED
Data reception failed.
Definition ieee802154_radio.h:561
@ IEEE802154_EVENT_RX_OFF
An RX slot ended, requires IEEE802154_HW_RXTIME.
Definition ieee802154_radio.h:569
@ IEEE802154_CONFIG_PRIV_START
This and higher values are specific to the protocol- or driver-specific extensions.
Definition ieee802154_radio.h:1131
@ IEEE802154_CONFIG_EXPECTED_RX_TIME
Configure a timepoint at which an RX frame is expected to arrive.
Definition ieee802154_radio.h:1007
@ IEEE802154_CONFIG_CSMA_CA_BACKOFFS
The maximum number of backoffs the CSMA-CA algorithm will attempt before declaring a channel access f...
Definition ieee802154_radio.h:1125
@ IEEE802154_CONFIG_AUTO_ACK_FPB
Indicates how the driver should set the Frame Pending bit in ACK responses for Data Requests.
Definition ieee802154_radio.h:693
@ IEEE802154_CONFIG_PROMISCUOUS
Enable/disable promiscuous mode.
Definition ieee802154_radio.h:718
@ IEEE802154_CONFIG_COMMON_COUNT
Number of types defined in ieee802154_config_type.
Definition ieee802154_radio.h:1128
@ IEEE802154_CONFIG_ENH_ACK_HEADER_IE
Adds a header information element (IE) to be injected into enhanced ACK frames generated by the drive...
Definition ieee802154_radio.h:1089
@ IEEE802154_CONFIG_MAC_KEYS
Updates MAC keys, key index and the per-key frame counter for drivers supporting transmit security of...
Definition ieee802154_radio.h:739
@ IEEE802154_CONFIG_EVENT_HANDLER
Specifies new IEEE 802.15.4 driver event handler.
Definition ieee802154_radio.h:726
@ IEEE802154_CONFIG_RX_ON_WHEN_IDLE
Enable/disable RxOnWhenIdle MAC PIB attribute (Table 8-94).
Definition ieee802154_radio.h:1118
@ IEEE802154_CONFIG_CSL_PERIOD
Enables or disables a device as a CSL receiver and configures its CSL period.
Definition ieee802154_radio.h:953
@ IEEE802154_CONFIG_FRAME_COUNTER_IF_LARGER
Sets the current MAC frame counter value if the provided value is greater than the current one.
Definition ieee802154_radio.h:770
@ IEEE802154_CONFIG_FRAME_COUNTER
Sets the current MAC frame counter value associated with the interface for drivers supporting transmi...
Definition ieee802154_radio.h:756
@ IEEE802154_CONFIG_PAN_COORDINATOR
Indicates whether the device is a PAN coordinator.
Definition ieee802154_radio.h:711
@ IEEE802154_CONFIG_ACK_FPB
Indicates whether to set ACK Frame Pending bit for specific address or not.
Definition ieee802154_radio.h:703
@ IEEE802154_CONFIG_RX_SLOT
Set or unset a radio reception window (RX slot).
Definition ieee802154_radio.h:821
@ IEEE802154_FILTER_TYPE_SHORT_ADDR
Short address type filter.
Definition ieee802154_radio.h:550
@ IEEE802154_FILTER_TYPE_IEEE_ADDR
Address type filter.
Definition ieee802154_radio.h:549
@ IEEE802154_FILTER_TYPE_PAN_ID
PAN id type filter.
Definition ieee802154_radio.h:551
@ IEEE802154_FILTER_TYPE_SRC_SHORT_ADDR
Source short address type filter.
Definition ieee802154_radio.h:553
@ IEEE802154_FILTER_TYPE_SRC_IEEE_ADDR
Source address type filter.
Definition ieee802154_radio.h:552
@ IEEE802154_TX_MODE_CCA
Perform CCA before packet transmission.
Definition ieee802154_radio.h:632
@ IEEE802154_TX_MODE_TXTIME_CCA
Transmit packet in the future, perform CCA before transmission.
Definition ieee802154_radio.h:660
@ IEEE802154_TX_MODE_CSMA_CA
Perform full CSMA/CA procedure before packet transmission.
Definition ieee802154_radio.h:639
@ IEEE802154_TX_MODE_DIRECT
Transmit packet immediately, no CCA.
Definition ieee802154_radio.h:629
@ IEEE802154_TX_MODE_TXTIME
Transmit packet in the future, at the specified time, no CCA.
Definition ieee802154_radio.h:648
@ IEEE802154_TX_MODE_COMMON_COUNT
Number of modes defined in ieee802154_tx_mode.
Definition ieee802154_radio.h:663
@ IEEE802154_TX_MODE_PRIV_START
This and higher values are specific to the protocol- or driver-specific extensions.
Definition ieee802154_radio.h:666
@ IEEE802154_FPB_ADDR_MATCH_THREAD
The pending bit shall be set only for addresses found in the list.
Definition ieee802154_radio.h:672
@ IEEE802154_FPB_ADDR_MATCH_ZIGBEE
The pending bit shall be cleared for short addresses found in the list.
Definition ieee802154_radio.h:677
@ IEEE802154_ATTR_PHY_CHANNEL_PAGE_TEN_SUN_FSK_GENERIC
SUN FSK/OFDM/O-QPSK PHYs - generic modulation and channel description, see sections 10....
Definition ieee802154_radio.h:219
@ IEEE802154_ATTR_PHY_CHANNEL_PAGE_SEVEN_MSK
MSK PHY - 780 MHz and 2450 MHz bands, see sections 10.1.3.6, 10.1.3.7.
Definition ieee802154_radio.h:204
@ IEEE802154_ATTR_PHY_CHANNEL_PAGE_ONE_DEPRECATED
Formerly ASK PHY - deprecated in IEEE 802.15.4-2015.
Definition ieee802154_radio.h:186
@ IEEE802154_ATTR_PHY_CHANNEL_PAGE_THIRTEEN_RCC
RCC PHY, see section 10.1.3.12.
Definition ieee802154_radio.h:228
@ IEEE802154_ATTR_PHY_CHANNEL_PAGE_TWO_OQPSK_868_915
O-QPSK PHY - 868 MHz and 915 MHz bands, see section 10.1.3.3.
Definition ieee802154_radio.h:189
@ IEEE802154_ATTR_PHY_CHANNEL_PAGE_FOUR_HRP_UWB
UWB PHY - SubG, low and high bands, see section 10.1.3.5.
Definition ieee802154_radio.h:195
@ IEEE802154_ATTR_PHY_CHANNEL_PAGE_TWELVE_LECIM
LECIM DSSS/FSK PHYs, see section 10.1.3.11.
Definition ieee802154_radio.h:225
@ IEEE802154_ATTR_PHY_CHANNEL_PAGE_FIVE_OQPSK_780
O-QPSK PHY - 780 MHz band, see section 10.1.3.2.
Definition ieee802154_radio.h:198
@ IEEE802154_ATTR_PHY_CHANNEL_PAGE_THREE_CSS
CSS PHY - 2450 MHz band, see section 10.1.3.4.
Definition ieee802154_radio.h:192
@ IEEE802154_ATTR_PHY_CHANNEL_PAGE_ZERO_OQPSK_2450_BPSK_868_915
Channel page zero supports the 2.4G channels of the O-QPSK PHY and all channels from the BPSK PHYs in...
Definition ieee802154_radio.h:183
@ IEEE802154_ATTR_PHY_CHANNEL_PAGE_NINE_SUN_PREDEFINED
SUN FSK/OFDM/O-QPSK PHYs - predefined bands, operating modes and channels, see sections 10....
Definition ieee802154_radio.h:213
@ IEEE802154_ATTR_PHY_CHANNEL_PAGE_EIGHT_LRP_UWB
LRP UWB PHY, see sections 10.1.3.8.
Definition ieee802154_radio.h:207
@ IEEE802154_ATTR_PHY_CHANNEL_PAGE_ELEVEN_OQPSK_2380
O-QPSK PHY - 2380 MHz band, see section 10.1.3.10.
Definition ieee802154_radio.h:222
@ IEEE802154_ATTR_PHY_CHANNEL_PAGE_SIX_RESERVED
reserved - not currently assigned
Definition ieee802154_radio.h:201
@ IEEE802154_ATTR_PHY_SUPPORTED_CHANNEL_PAGES
Retrieves a bit field with supported channel pages.
Definition ieee802154_radio.h:1304
@ IEEE802154_ATTR_COMMON_COUNT
Number of attributes defined in ieee802154_attr.
Definition ieee802154_radio.h:1321
@ IEEE802154_ATTR_PHY_SUPPORTED_CHANNEL_RANGES
Retrieves a pointer to the array of supported channel ranges within the currently configured channel ...
Definition ieee802154_radio.h:1311
@ IEEE802154_ATTR_PRIV_START
This and higher values are specific to the protocol- or driver-specific extensions.
Definition ieee802154_radio.h:1326
@ IEEE802154_ATTR_PHY_HRP_UWB_SUPPORTED_PRFS
Retrieves a bit field with supported HRP UWB nominal pulse repetition frequencies.
Definition ieee802154_radio.h:1318
@ IEEE802154_HW_FCS
Frame checksum verification supported.
Definition ieee802154_radio.h:465
@ IEEE802154_HW_ENERGY_SCAN
Energy detection (ED) supported (optional).
Definition ieee802154_radio.h:447
@ IEEE802154_HW_CSMA
CSMA-CA procedure supported on TX.
Definition ieee802154_radio.h:474
@ IEEE802154_HW_SLEEP_TO_TX
TX directly from sleep supported.
Definition ieee802154_radio.h:512
@ IEEE802154_HW_TXTIME
TX at specified time supported.
Definition ieee802154_radio.h:486
@ IEEE802154_HW_PROMISC
Promiscuous mode supported.
Definition ieee802154_radio.h:471
@ IEEE802154_HW_RXTIME
Timed RX window scheduling supported.
Definition ieee802154_radio.h:515
@ IEEE802154_HW_RETRANSMISSION
Supports retransmission on TX ACK timeout.
Definition ieee802154_radio.h:480
@ IEEE802154_HW_TX_SEC
TX security supported (key management, encryption and authentication).
Definition ieee802154_radio.h:518
@ IEEE802154_HW_TX_RX_ACK
Waits for ACK on TX if AR bit is set in TX pkt.
Definition ieee802154_radio.h:477
@ IEEE802154_HW_SELECTIVE_TXCHANNEL
Support for timed transmissions on selective channel.
Definition ieee802154_radio.h:534
@ IEEE802154_RX_ON_WHEN_IDLE
RxOnWhenIdle handling supported.
Definition ieee802154_radio.h:521
@ IEEE802154_HW_RX_TX_ACK
Sends ACK on RX if AR bit is set in RX pkt.
Definition ieee802154_radio.h:483
@ IEEE802154_HW_FILTER
Filtering of PAN ID, extended and short address supported.
Definition ieee802154_radio.h:468
net_verdict
Net Verdict.
Definition net_core.h:84
int64_t net_time_t
Any occurrence of net_time_t specifies a concept of nanosecond resolution scalar time span,...
Definition net_time.h:103
#define BIT(n)
Unsigned integer with bit position n set (signed in assembly language).
Definition util_macro.h:44
#define ENOENT
No such file or directory.
Definition errno.h:40
IEEE 802.15.4 native L2 stack public header.
IEEE 802.15.4 MAC information element (IE) related types and helpers.
Public API for network interface.
Network packet buffer descriptor API.
Representation of nanosecond resolution elapsed time and timestamps in the network stack.
__UINT32_TYPE__ uint32_t
Definition stdint.h:90
__UINT8_TYPE__ uint8_t
Definition stdint.h:88
__UINT16_TYPE__ uint16_t
Definition stdint.h:89
__INT16_TYPE__ int16_t
Definition stdint.h:73
Runtime device structure (in ROM) per driver instance.
Definition device.h:513
IEEE 802.15.4 driver attribute values.
Definition ieee802154_radio.h:1342
uint32_t phy_supported_channel_pages
A bit field that represents the supported channel pages, see ieee802154_phy_channel_page.
Definition ieee802154_radio.h:1363
const struct ieee802154_phy_supported_channels * phy_supported_channels
Pointer to a structure representing channel ranges currently available on the selected channel page.
Definition ieee802154_radio.h:1400
uint32_t phy_hrp_uwb_supported_nominal_prfs
A bit field representing supported HRP UWB pulse repetition frequencies (PRF), see enum ieee802154_ph...
Definition ieee802154_radio.h:1416
IEEE 802.15.4 driver configuration data.
Definition ieee802154_radio.h:1151
const uint8_t * ext_addr
Filters the devices that will receive this IE by extended address.
Definition ieee802154_radio.h:1268
bool pan_coordinator
see IEEE802154_CONFIG_PAN_COORDINATOR
Definition ieee802154_radio.h:1168
ieee802154_event_cb_t event_handler
see IEEE802154_CONFIG_EVENT_HANDLER
Definition ieee802154_radio.h:1177
uint32_t frame_counter
see IEEE802154_CONFIG_FRAME_COUNTER
Definition ieee802154_radio.h:1199
struct ieee802154_config::@110307323070236071131232105145036043000055221302::@005301360373345054306047221374265242072206100157 ack_ie
see IEEE802154_CONFIG_ENH_ACK_HEADER_IE
struct ieee802154_config::@110307323070236071131232105145036043000055221302::@117015150333345107057234147304240206273333351324 ack_fpb
see IEEE802154_CONFIG_ACK_FPB
uint32_t csl_period
see IEEE802154_CONFIG_CSL_PERIOD
Definition ieee802154_radio.h:1239
struct ieee802154_header_ie * header_ie
Pointer to the header IE, see section 7.4.2.1, figure 7-21.
Definition ieee802154_radio.h:1257
bool extended
Is extended address.
Definition ieee802154_radio.h:1163
uint8_t * addr
little endian for both short and extended address
Definition ieee802154_radio.h:1162
net_time_t expected_rx_time
see IEEE802154_CONFIG_EXPECTED_RX_TIME
Definition ieee802154_radio.h:1244
net_time_t start
Nanosecond resolution timestamp relative to the network subsystem's local clock defining the start of...
Definition ieee802154_radio.h:1214
bool purge_ie
Flag for purging enh ACK header IEs.
Definition ieee802154_radio.h:1288
bool rx_on_when_idle
see IEEE802154_CONFIG_RX_ON_WHEN_IDLE
Definition ieee802154_radio.h:1174
uint8_t channel
Used channel.
Definition ieee802154_radio.h:1231
struct ieee802154_key * mac_keys
see IEEE802154_CONFIG_MAC_KEYS
Definition ieee802154_radio.h:1196
uint16_t short_addr
Filters the devices that will receive this IE by short address.
Definition ieee802154_radio.h:1279
struct ieee802154_config::@110307323070236071131232105145036043000055221302::@231214146026334237075020313153116027155117003216 rx_slot
see IEEE802154_CONFIG_RX_SLOT
bool promiscuous
see IEEE802154_CONFIG_PROMISCUOUS
Definition ieee802154_radio.h:1171
struct ieee802154_config::@110307323070236071131232105145036043000055221302::@157332356170373250105215351305040236107225232072 auto_ack_fpb
see IEEE802154_CONFIG_AUTO_ACK_FPB
net_time_t duration
Nanosecond resolution duration of the RX window relative to the above RX window start time during whi...
Definition ieee802154_radio.h:1226
enum ieee802154_fpb_mode mode
Auto ACK FPB mode.
Definition ieee802154_radio.h:1157
bool enabled
Is auto ACK FPB enabled.
Definition ieee802154_radio.h:1156
uint8_t csma_ca_backoffs
see IEEE802154_CONFIG_CSMA_CA_BACKOFFS
Definition ieee802154_radio.h:1180
Filter value, see ieee802154_radio_api::filter.
Definition ieee802154_radio.h:598
uint16_t short_addr
Short address, in CPU byte order.
Definition ieee802154_radio.h:603
uint16_t pan_id
PAN ID, in CPU byte order.
Definition ieee802154_radio.h:605
uint8_t * ieee_addr
Extended address, in little endian.
Definition ieee802154_radio.h:601
Key configuration for transmit security offloading, see IEEE802154_CONFIG_MAC_KEYS.
Definition ieee802154_radio.h:613
uint8_t * key_value
Key material.
Definition ieee802154_radio.h:615
uint32_t key_frame_counter
Initial value of frame counter associated with the key, see section 9.4.3.
Definition ieee802154_radio.h:617
bool frame_counter_per_key
Indicates if per-key frame counter should be used, see section 9.4.3.
Definition ieee802154_radio.h:619
uint8_t key_id_mode
Key Identifier Mode, see section 9.4.2.3, Table 9-7.
Definition ieee802154_radio.h:621
uint8_t * key_id
Key Identifier, see section 9.4.4.
Definition ieee802154_radio.h:623
Represents a supported channel range, see ieee802154_phy_supported_channels.
Definition ieee802154_radio.h:235
uint16_t to_channel
To channel range.
Definition ieee802154_radio.h:237
uint16_t from_channel
From channel range.
Definition ieee802154_radio.h:236
Represents a list channels supported by a driver for a given interface, see IEEE802154_ATTR_PHY_SUPPO...
Definition ieee802154_radio.h:244
const struct ieee802154_phy_channel_range *const ranges
Pointer to an array of channel range structures.
Definition ieee802154_radio.h:251
const uint8_t num_ranges
The number of currently available channel ranges.
Definition ieee802154_radio.h:254
IEEE 802.15.4 driver interface API.
Definition ieee802154_radio.h:1529
int(* ed_scan)(const struct device *dev, uint16_t duration, energy_scan_done_cb_t done_cb)
Run an energy detection scan.
Definition ieee802154_radio.h:1891
enum ieee802154_hw_caps(* get_capabilities)(const struct device *dev)
Get the device driver capabilities.
Definition ieee802154_radio.h:1550
int(* attr_get)(const struct device *dev, enum ieee802154_attr attr, struct ieee802154_attr_value *value)
Get the value of a driver specific attribute.
Definition ieee802154_radio.h:1957
int(* start)(const struct device *dev)
Start the device.
Definition ieee802154_radio.h:1756
int(* cca)(const struct device *dev)
Clear Channel Assessment - Check channel's activity.
Definition ieee802154_radio.h:1568
int(* tx)(const struct device *dev, enum ieee802154_tx_mode mode, struct net_pkt *pkt, struct net_buf *frag)
Transmit a packet fragment as a single frame.
Definition ieee802154_radio.h:1732
int(* stop)(const struct device *dev)
Stop the device.
Definition ieee802154_radio.h:1780
net_time_t(* get_time)(const struct device *dev)
Get the current time in nanoseconds relative to the network subsystem's local uptime clock as represe...
Definition ieee802154_radio.h:1912
int(* configure)(const struct device *dev, enum ieee802154_config_type type, const struct ieee802154_config *config)
Set or update driver configuration.
Definition ieee802154_radio.h:1863
int(* set_channel)(const struct device *dev, uint16_t channel)
Set current channel.
Definition ieee802154_radio.h:1592
int(* filter)(const struct device *dev, bool set, enum ieee802154_filter_type type, const struct ieee802154_filter *filter)
Set/Unset PAN ID, extended or short address filters.
Definition ieee802154_radio.h:1617
struct net_if_api iface_api
network interface API
Definition ieee802154_radio.h:1537
uint8_t(* get_sch_acc)(const struct device *dev)
Get the current estimated worst case accuracy (maximum ± deviation from the nominal frequency) of the...
Definition ieee802154_radio.h:1934
int(* set_txpower)(const struct device *dev, int16_t dbm)
Set TX power level in dbm.
Definition ieee802154_radio.h:1638
Network buffer representation.
Definition net_buf.h:1015
uint8_t * data
Pointer to the start of data in the buffer.
Definition net_buf.h:1104
Network Interface structure.
Definition net_if.h:735
Network packet.
Definition net_pkt.h:119
Misc utilities.