mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2025-01-17 17:52:47 +01:00
kw2xrf: Add NETOPT_CHANNEL to getters
This commit is contained in:
parent
43d39b7a33
commit
603b754d24
@ -318,6 +318,13 @@ int _get(netdev_t *netdev, netopt_t opt, void *value, size_t len)
|
|||||||
!!(dev->netdev.flags & KW2XRF_OPT_AUTOCCA);
|
!!(dev->netdev.flags & KW2XRF_OPT_AUTOCCA);
|
||||||
return sizeof(netopt_enable_t);
|
return sizeof(netopt_enable_t);
|
||||||
|
|
||||||
|
case NETOPT_CHANNEL:
|
||||||
|
if (len < sizeof(uint16_t)) {
|
||||||
|
return -EOVERFLOW;
|
||||||
|
}
|
||||||
|
*((uint16_t *)value) = kw2xrf_get_channel(dev);
|
||||||
|
return sizeof(uint16_t);
|
||||||
|
|
||||||
case NETOPT_TX_POWER:
|
case NETOPT_TX_POWER:
|
||||||
if (len < sizeof(int16_t)) {
|
if (len < sizeof(int16_t)) {
|
||||||
return -EOVERFLOW;
|
return -EOVERFLOW;
|
||||||
|
Loading…
Reference in New Issue
Block a user