1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-12-27 15:31:17 +01:00

ieee802154/submac: call confirm_set_trx_state after initialization

This commit is contained in:
Jose Alamos 2021-06-07 13:37:19 +02:00
parent 9d754a6ed4
commit 4bd77183a3
No known key found for this signature in database
GPG Key ID: F483EB800EF89DD9

View File

@ -370,15 +370,16 @@ int ieee802154_submac_init(ieee802154_submac_t *submac, const network_uint16_t *
/* Configure PHY settings (mode, channel, TX power) */
ieee802154_phy_conf_t conf =
{ .phy_mode = submac->phy_mode,
.channel = CONFIG_IEEE802154_DEFAULT_CHANNEL,
.page = CONFIG_IEEE802154_DEFAULT_SUBGHZ_PAGE,
.pow = CONFIG_IEEE802154_DEFAULT_TXPOWER };
.channel = submac->channel_num,
.page = submac->channel_page,
.pow = submac->tx_pow };
ieee802154_radio_config_phy(dev, &conf);
assert(ieee802154_radio_set_cca_threshold(dev,
CONFIG_IEEE802154_CCA_THRESH_DEFAULT) >= 0);
ieee802154_radio_request_set_trx_state(dev, IEEE802154_TRX_STATE_RX_ON);
while(ieee802154_radio_confirm_set_trx_state(dev) == -EAGAIN) {};
return 0;
}