mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
Merge pull request #10426 from bergzand/pr/cc2538_rf/undedup_channel
cc2538_rf: Don't use netdev_ieee802154_t for channel
This commit is contained in:
commit
7a8469f1aa
@ -77,6 +77,13 @@ static int _get(netdev_t *netdev, netopt_t opt, void *value, size_t max_len)
|
||||
}
|
||||
return sizeof(netopt_enable_t);
|
||||
|
||||
case NETOPT_CHANNEL:
|
||||
if (max_len < sizeof(uint16_t)) {
|
||||
return -EOVERFLOW;
|
||||
}
|
||||
*((uint16_t *)value) = (uint16_t)cc2538_get_chan();
|
||||
return sizeof(uint16_t);
|
||||
|
||||
case NETOPT_CHANNEL_PAGE:
|
||||
if (max_len < sizeof(uint16_t)) {
|
||||
return -EOVERFLOW;
|
||||
@ -188,6 +195,7 @@ static int _set(netdev_t *netdev, netopt_t opt, const void *value, size_t value_
|
||||
}
|
||||
else {
|
||||
cc2538_set_chan(chan);
|
||||
res = sizeof(uint16_t);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user