mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2025-12-15 17:43:51 +01:00
Merge pull request #21579 from fabian18/pr/submac_tx_power
submac: add TX power to retrievable netopts
This commit is contained in:
commit
06a22e3dd5
@ -59,6 +59,9 @@ static int _get(netdev_t *netdev, netopt_t opt, void *value, size_t max_len)
|
||||
case NETOPT_IEEE802154_PHY:
|
||||
*((uint8_t*) value) = ieee802154_get_phy_mode(submac);
|
||||
return 1;
|
||||
case NETOPT_TX_POWER:
|
||||
*((int16_t *)value) = netdev_submac->dev.txpower;
|
||||
return sizeof(int16_t);
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
@ -783,8 +783,9 @@ int ieee802154_set_phy_conf(ieee802154_submac_t *submac, const ieee802154_phy_co
|
||||
|
||||
/* Go back to RX if needed */
|
||||
if (current_state == IEEE802154_FSM_STATE_RX) {
|
||||
res = ieee802154_radio_set_rx(dev);
|
||||
assert (res >= 0);
|
||||
int rx = ieee802154_radio_set_rx(dev);
|
||||
assert(rx >= 0);
|
||||
(void)rx;
|
||||
}
|
||||
|
||||
return res;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user