Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

drivers: ieee802154: cc13xx_cc26xx: sub-ghz support #29598

Merged
merged 1 commit into from
Nov 9, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions drivers/ieee802154/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ zephyr_sources_ifdef(CONFIG_IEEE802154_MCR20A ieee802154_mcr20a.c)
zephyr_sources_ifdef(CONFIG_IEEE802154_NRF5 ieee802154_nrf5.c)
zephyr_sources_ifdef(CONFIG_IEEE802154_CC1200 ieee802154_cc1200.c)
zephyr_sources_ifdef(CONFIG_IEEE802154_CC13XX_CC26XX ieee802154_cc13xx_cc26xx.c)
zephyr_sources_ifdef(CONFIG_IEEE802154_CC13XX_CC26XX_SUB_GHZ ieee802154_cc13xx_cc26xx_subg.c)
zephyr_sources_ifdef(CONFIG_IEEE802154_RF2XX ieee802154_rf2xx.c)
zephyr_sources_ifdef(CONFIG_IEEE802154_RF2XX ieee802154_rf2xx_iface.c)
zephyr_sources_ifdef(CONFIG_IEEE802154_DW1000 ieee802154_dw1000.c)
Expand Down
34 changes: 34 additions & 0 deletions drivers/ieee802154/Kconfig.cc13xx_cc26xx
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,37 @@ config IEEE802154_CC13XX_CC26XX_INIT_PRIO
Set the initialization priority number.

endif # IEEE802154_CC13XX_CC26XX

menuconfig IEEE802154_CC13XX_CC26XX_SUB_GHZ
bool "TI CC13xx / CC26xx IEEE 802.15.4g driver support"
select NET_L2_IEEE802154_SUB_GHZ

if IEEE802154_CC13XX_CC26XX_SUB_GHZ

config IEEE802154_CC13XX_CC26XX_SUB_GHZ_DRV_NAME
string "TI CC13xx / CC26xx IEEE 802.15.4g driver's name"
default "IEEE802154_1"
help
This option sets the driver name.

config IEEE802154_CC13XX_CC26XX_SUB_GHZ_NUM_RX_BUF
int "TI CC13xx / CC26xx IEEE 802.15.4g receive buffer count"
default 2
help
This option allows the user to configure the number of
receive buffers.

config IEEE802154_CC13XX_CC26XX_SUB_GHZ_CS_THRESHOLD
int "TI CC13xx / CC26xx IEEE 802.15.4g Carrier Sense Threshold in dBm"
default -70
help
This option sets RSSI threshold for carrier sense in the CSMA/CA
algorithm.

config IEEE802154_CC13XX_CC26XX_SUB_GHZ_INIT_PRIO
int "TI CC13xx / CC26xx IEEE 802.15.4g initialization priority"
default 80
help
Set the initialization priority number.

endif # IEEE802154_CC13XX_CC26XX_SUB_GHZ
8 changes: 5 additions & 3 deletions drivers/ieee802154/ieee802154_cc13xx_cc26xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -447,10 +447,12 @@ static int ieee802154_cc13xx_cc26xx_stop(const struct device *dev)

RF_Stat status;

status = RF_flushCmd(drv_data->rf_handle, RF_CMDHANDLE_FLUSH_ALL, RF_ABORT_PREEMPTION);
if (!(status == RF_StatCmdDoneSuccess || status == RF_StatSuccess
status = RF_flushCmd(drv_data->rf_handle, RF_CMDHANDLE_FLUSH_ALL, 0);
if (!(status == RF_StatCmdDoneSuccess
|| status == RF_StatSuccess
|| status == RF_StatRadioInactiveError
|| status == RF_StatInvalidParamsError)) {
LOG_ERR("Failed to abort radio operations (%d)", status);
LOG_DBG("Failed to abort radio operations (%d)", status);
return -EIO;
}

Expand Down
Loading