1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-01-17 04:52:59 +01:00

kw2xrf: Add NETOPT_CHANNEL to getters

This commit is contained in:
Koen Zandberg 2018-12-03 10:15:33 +01:00
parent 43d39b7a33
commit 603b754d24
No known key found for this signature in database
GPG Key ID: 0895A893E6D2985B

View File

@ -318,6 +318,13 @@ int _get(netdev_t *netdev, netopt_t opt, void *value, size_t len)
!!(dev->netdev.flags & KW2XRF_OPT_AUTOCCA);
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:
if (len < sizeof(int16_t)) {
return -EOVERFLOW;