Browse Source

drivers: ieee802154_nrf5: cabability IEE802154_OPENTHREAD_HW_CST

The new Kconfig option `IEEE802154_NRF5_CST_ENDPOINT` is added.
When it is enabled, then capability `IEE802154_OPENTHREAD_HW_CST`
is supported by the ieee802154_nrf5 driver and allows to set the
CST period and CST expected transmission time point.
This feature is an OpenThread-specific extention to the
ieee802154_nrf5 driver.

Signed-off-by: Damian Krolik <damian.krolik@nordicsemi.no>
Co-authored-by: Andrzej Kuroś <andrzej.kuros@nordicsemi.no>
pull/81485/head
Damian Krolik 9 months ago committed by Anas Nashif
parent
commit
c9dbce36c0
  1. 8
      drivers/ieee802154/Kconfig.nrf5
  2. 14
      drivers/ieee802154/ieee802154_nrf5.c

8
drivers/ieee802154/Kconfig.nrf5

@ -94,4 +94,12 @@ config IEEE802154_NRF5_MULTIPLE_CCA @@ -94,4 +94,12 @@ config IEEE802154_NRF5_MULTIPLE_CCA
When this option is enabled the OpenThread capability
IEEE802154_OPENTHREAD_HW_MULTIPLE_CCA is supported by the ieee802154_nrf5.
config IEEE802154_NRF5_CST_ENDPOINT
bool "Support for OpenThread CST Endpoint extension in the ieee802154_nrf5."
help
Enable support for OpenThread CST (Coordinated Sampled Transmitter) Endpoint
with CST IE injection as an extension to ieee802154_nrf5 driver.
When this option is enabled, the ieee802154_nrf5 driver supports the
IEEE802154_OPENTHREAD_HW_CST capability.
endif

14
drivers/ieee802154/ieee802154_nrf5.c

@ -258,6 +258,9 @@ static void nrf5_get_capabilities_at_boot(void) @@ -258,6 +258,9 @@ static void nrf5_get_capabilities_at_boot(void)
#endif
#if defined(CONFIG_IEEE802154_SELECTIVE_TXCHANNEL)
| IEEE802154_HW_SELECTIVE_TXCHANNEL
#endif
#if defined(CONFIG_IEEE802154_NRF5_CST_ENDPOINT)
| IEEE802154_OPENTHREAD_HW_CST
#endif
;
}
@ -1028,6 +1031,17 @@ static int nrf5_configure(const struct device *dev, @@ -1028,6 +1031,17 @@ static int nrf5_configure(const struct device *dev,
}
break;
#if defined(CONFIG_IEEE802154_NRF5_CST_ENDPOINT)
case IEEE802154_OPENTHREAD_CONFIG_CST_PERIOD:
nrf_802154_cst_writer_period_set(config->cst_period);
break;
case IEEE802154_OPENTHREAD_CONFIG_EXPECTED_TX_TIME:
nrf_802154_cst_writer_anchor_time_set(nrf_802154_timestamp_phr_to_mhr_convert(
config->expected_tx_time / NSEC_PER_USEC));
break;
#endif /* CONFIG_IEEE802154_NRF5_CST_ENDPOINT */
default:
return -EINVAL;
}

Loading…
Cancel
Save