Merge pull request #4192 from OlegHahm/at86rf2xx_set_proto
at86rf2xx: added protocol setter
This commit is contained in:
commit
4cc4be50ff
@ -644,6 +644,16 @@ static int _set(gnrc_netdev_t *device, netopt_t opt, void *val, size_t len)
|
||||
}
|
||||
break;
|
||||
|
||||
case NETOPT_PROTO:
|
||||
if (len != sizeof(gnrc_nettype_t)) {
|
||||
res = -EINVAL;
|
||||
}
|
||||
else {
|
||||
dev->proto = (gnrc_nettype_t) val;
|
||||
res = sizeof(gnrc_nettype_t);
|
||||
}
|
||||
break;
|
||||
|
||||
case NETOPT_CHANNEL:
|
||||
if (len != sizeof(uint16_t)) {
|
||||
res = -EINVAL;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user