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
26 extern "C" {
27 #endif
28 
29 #include "net/netdev.h"
30 #include "net/netdev/ieee802154.h"
31 #include "net/ieee802154/submac.h"
32 #include "net/ieee802154/radio.h"
33 #include "xtimer.h"
34 
35 #include "od.h"
36 #include "event/thread.h"
37 #include "event/callback.h"
38 #include "xtimer.h"
39 
40 #define NETDEV_SUBMAC_FLAGS_ACK_TIMEOUT (1 << 0)
41 #define NETDEV_SUBMAC_FLAGS_TX_DONE (1 << 1)
42 #define NETDEV_SUBMAC_FLAGS_RX_DONE (1 << 2)
47 typedef struct {
51  int isr_flags;
52  int8_t retrans;
54 
65  ieee802154_dev_t *dev);
66 #ifdef __cplusplus
67 }
68 #endif
69 
70 #endif /* NET_NETDEV_IEEE802154_SUBMAC_H */
71 
xtimer
xtimer timer structure
Definition: xtimer.h:81
ieee802154.h
Definitions for netdev common IEEE 802.15.4 code.
netdev_ieee802154_submac_t::isr_flags
int isr_flags
netdev submac NETDEV_EVENT_ISR flags
Definition: ieee802154_submac.h:51
callback.h
Provides a callback-with-argument event type.
od.h
netdev_ieee802154_submac_t::dev
netdev_ieee802154_t dev
IEEE 802.15.4 netdev descriptor.
Definition: ieee802154_submac.h:48
thread.h
Provides utility functions for event handler threads.
netdev.h
Definitions low-level network driver interface.
ieee802154_dev
the IEEE802.15.4 device descriptor
Definition: radio.h:285
netdev_ieee802154_submac_t::retrans
int8_t retrans
number of frame retransmissions of the last TX
Definition: ieee802154_submac.h:52
netdev_ieee802154_t
Extended structure to hold IEEE 802.15.4 driver state.
Definition: ieee802154.h:90
ieee802154_submac
IEEE 802.15.4 SubMAC descriptor.
Definition: submac.h:106
netdev_ieee802154_submac_t::submac
ieee802154_submac_t submac
IEEE 802.15.4 SubMAC descriptor.
Definition: ieee802154_submac.h:49
netdev_ieee802154_submac_t::ack_timer
xtimer_t ack_timer
xtimer descriptor for the ACK timeout timer
Definition: ieee802154_submac.h:50
netdev_ieee802154_submac_init
int netdev_ieee802154_submac_init(netdev_ieee802154_submac_t *netdev_submac, ieee802154_dev_t *dev)
Init the IEEE 802.15.4 SubMAC netdev adoption.
netdev_ieee802154_submac_t
IEEE 802.15.4 SubMAC netdev descriptor.
Definition: ieee802154_submac.h:47
xtimer.h
xtimer interface definitions