Loading...
Searching...
No Matches
ieee802154_submac.h
1/*
2 * SPDX-FileCopyrightText: 2020 HAW Hamburg
3 * SPDX-License-Identifier: LGPL-2.1-only
4 */
5
6#pragma once
7
21
22#ifdef __cplusplus
23extern "C" {
24#endif
25
26#include "net/netdev.h"
28#include "net/ieee802154/submac.h"
29#include "net/ieee802154/radio.h"
30#include "ztimer.h"
31
32#include "od.h"
33#include "event/thread.h"
34#include "event/callback.h"
35
36#define NETDEV_SUBMAC_FLAGS_ACK_TIMEOUT (1 << 0)
37#define NETDEV_SUBMAC_FLAGS_TX_DONE (1 << 1)
38#define NETDEV_SUBMAC_FLAGS_RX_DONE (1 << 2)
39#define NETDEV_SUBMAC_FLAGS_CRC_ERROR (1 << 3)
40#define NETDEV_SUBMAC_FLAGS_BH_REQUEST (1 << 4)
41
55
65
66#ifdef __cplusplus
67}
68#endif
69
Provides a callback-with-argument event type.
Definitions for netdev common IEEE 802.15.4 code.
Definitions low-level network driver interface.
netdev_event_t
Possible event types that are send from the device driver to the upper layer.
Definition netdev.h:231
int netdev_ieee802154_submac_init(netdev_ieee802154_submac_t *netdev_submac)
Init the IEEE 802.15.4 SubMAC netdev adoption.
struct ieee802154_submac ieee802154_submac_t
IEEE 802.15.4 SubMAC forward declaration.
Definition submac.h:124
IEEE 802.15.4 SubMAC netdev descriptor.
netdev_event_t ev
event to be dispatched
uint32_t isr_flags
netdev submac NETDEV_EVENT_ISR flags
int bytes_tx
size of the sent frame or tx error
bool dispatch
whether an event should be dispatched or not
ztimer_t ack_timer
ztimer descriptor for the ACK timeout timer
int8_t retrans
number of frame retransmissions of the last TX
netdev_ieee802154_t dev
IEEE 802.15.4 netdev descriptor.
ieee802154_submac_t submac
IEEE 802.15.4 SubMAC descriptor.
Extended structure to hold IEEE 802.15.4 driver state.
Definition ieee802154.h:97
ztimer structure
Definition ztimer.h:319
Provides utility functions for event handler threads.
ztimer API