1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

tests/ieee802154_hal: adapt config_phy call to TRX_OFF precondition

This commit is contained in:
Jose Alamos 2020-10-22 11:55:19 +02:00
parent 4e2a1cfa9c
commit ee802467fb

View File

@ -478,6 +478,7 @@ int config_phy(int argc, char **argv)
puts("Wrong channel configuration (11 <= channel <= 26).");
return 1;
}
_set_trx_state(IEEE802154_TRX_STATE_TRX_OFF, false);
ieee802154_dev_t *dev = ieee802154_hal_test_get_dev(RADIO_DEFAULT_ID);
ieee802154_phy_conf_t conf = {.channel=channel, .page=0, .pow=tx_pow};
if (ieee802154_radio_config_phy(dev, &conf) < 0) {
@ -487,6 +488,8 @@ int config_phy(int argc, char **argv)
puts("Success!");
}
_set_trx_state(IEEE802154_TRX_STATE_RX_ON, false);
return 0;
}