Loading...
Searching...
No Matches
ieee802154_submac.h
1/*
2 * Copyright (C) 2020 HAW Hamburg
3 *
4 * This file is subject to the terms and conditions of the GNU Lesser General
5 * Public License v2.1. See the file LICENSE in the top level directory for more
6 * details.
7 */
8
22#ifndef NET_NETDEV_IEEE802154_SUBMAC_H
23#define NET_NETDEV_IEEE802154_SUBMAC_H
24
25#ifdef __cplusplus
26extern "C" {
27#endif
28
29#include "net/netdev.h"
31#include "net/ieee802154/submac.h"
32#include "net/ieee802154/radio.h"
33#include "ztimer.h"
34
35#include "od.h"
36#include "event/thread.h"
37#include "event/callback.h"
38
39#define NETDEV_SUBMAC_FLAGS_ACK_TIMEOUT (1 << 0)
40#define NETDEV_SUBMAC_FLAGS_TX_DONE (1 << 1)
41#define NETDEV_SUBMAC_FLAGS_RX_DONE (1 << 2)
42#define NETDEV_SUBMAC_FLAGS_CRC_ERROR (1 << 3)
43#define NETDEV_SUBMAC_FLAGS_BH_REQUEST (1 << 4)
57
67
68#ifdef __cplusplus
69}
70#endif
71
72#endif /* NET_NETDEV_IEEE802154_SUBMAC_H */
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:235
int netdev_ieee802154_submac_init(netdev_ieee802154_submac_t *netdev_submac)
Init the IEEE 802.15.4 SubMAC netdev adoption.
IEEE 802.15.4 SubMAC descriptor.
Definition submac.h:191
IEEE 802.15.4 SubMAC netdev descriptor.
netdev_event_t ev
event to be dispatched
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.
int isr_flags
netdev submac NETDEV_EVENT_ISR flags
ieee802154_submac_t submac
IEEE 802.15.4 SubMAC descriptor.
Extended structure to hold IEEE 802.15.4 driver state.
Definition ieee802154.h:100
ztimer structure
Definition ztimer.h:318
Provides utility functions for event handler threads.
ztimer API