1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-12-28 16:01:18 +01:00

at86rf2xx: added protocol setter

This commit is contained in:
Oleg Hahm 2015-10-31 17:29:47 +09:00
parent 26e67b86b5
commit 6bf7c8ef5f

View File

@ -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;