nrf802154.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2019 Freie Universität Berlin
3  *
4  * This file is subject to the terms and conditions of the GNU Lesser
5  * General Public License v2.1. See the file LICENSE in the top level
6  * directory for more details.
7  */
8 
36 #ifndef NRF802154_H
37 #define NRF802154_H
38 
39 #if IS_USED(MODULE_IEEE802154_RADIO_HAL)
40 #include "net/ieee802154/radio.h"
41 #if IS_USED(MODULE_NETDEV_IEEE802154_SUBMAC)
42 #include "net/netdev/ieee802154_submac.h"
43 #endif
44 #else
45 #include "net/netdev/ieee802154.h"
46 #endif
47 
48 #ifdef __cplusplus
49 extern "C" {
50 #endif
51 
58 typedef struct {
59 #if IS_USED(MODULE_NETDEV_IEEE802154_SUBMAC)
61 #elif !IS_USED(MODULE_IEEE802154_RADIO_HAL)
63 #endif
64 } nrf802154_t;
65 
78 #ifndef CONFIG_NRF802154_CCA_THRESH_DEFAULT
79 #define CONFIG_NRF802154_CCA_THRESH_DEFAULT 0x14
80 #endif
81 
89 #ifndef NRF802154_TIMER
90 #define NRF802154_TIMER TIMER_DEV(1)
91 #endif
92 
99 int nrf802154_init(void);
100 
106 void nrf802154_setup(nrf802154_t *dev);
107 
108 #endif /* NRF802154_H */
109 
ieee802154.h
Definitions for netdev common IEEE 802.15.4 code.
nrf802154_t::netdev
netdev_ieee802154_t netdev
ieee802154 device descriptor
Definition: nrf802154.h:62
nrf802154_setup
void nrf802154_setup(nrf802154_t *dev)
Setup a NRF802154 radio device for use with netdev.
nrf802154_init
int nrf802154_init(void)
Initialize the NRF52840 radio.
netdev
Structure to hold driver state.
Definition: netdev.h:302
netdev_ieee802154_t
Extended structure to hold IEEE 802.15.4 driver state.
Definition: ieee802154.h:90
netdev_ieee802154_submac_t
IEEE 802.15.4 SubMAC netdev descriptor.
Definition: ieee802154_submac.h:47
nrf802154_t
Device descriptor for NRF802154 transceiver.
Definition: nrf802154.h:58