net: l2: Add symbols for custom IEEE802154 L2
Define a custom IEEE802154 based L2. The user can then use those symbols to implement their own 802.15.4 based L2, based on those symbols, w/o a need to modify the Zephyr tree. Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
This commit is contained in:
parent
5cf235e601
commit
f3a9b8c83d
3 changed files with 26 additions and 1 deletions
|
@ -1080,9 +1080,13 @@ static struct ieee802154_radio_api nrf5_radio_api = {
|
|||
#define L2 OPENTHREAD_L2
|
||||
#define L2_CTX_TYPE NET_L2_GET_CTX_TYPE(OPENTHREAD_L2)
|
||||
#define MTU 1280
|
||||
#elif defined(CONFIG_NET_L2_CUSTOM_IEEE802154)
|
||||
#define L2 CUSTOM_IEEE802154_L2
|
||||
#define L2_CTX_TYPE NET_L2_GET_CTX_TYPE(CUSTOM_IEEE802154_L2)
|
||||
#define MTU CONFIG_NET_L2_CUSTOM_IEEE802154_MTU
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_NET_L2_IEEE802154) || defined(CONFIG_NET_L2_OPENTHREAD)
|
||||
#if defined(CONFIG_NET_L2_PHY_IEEE802154)
|
||||
NET_DEVICE_INIT(nrf5_154_radio, CONFIG_IEEE802154_NRF5_DRV_NAME,
|
||||
nrf5_init, NULL, &nrf5_data, &nrf5_radio_cfg,
|
||||
CONFIG_IEEE802154_NRF5_INIT_PRIO,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue