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

tests/sx127x: adapt to driver interface change using NETOPT_CHANNEL_FREQUENCY

This commit is contained in:
daniel-k 2018-01-05 12:28:29 +01:00
parent 101fb13997
commit 5eace384a7

View File

@ -261,7 +261,7 @@ int channel_cmd(int argc, char **argv)
uint32_t chan;
if (strstr(argv[1], "get") != NULL) {
netdev->driver->get(netdev, NETOPT_CHANNEL, &chan, sizeof(uint32_t));
netdev->driver->get(netdev, NETOPT_CHANNEL_FREQUENCY, &chan, sizeof(uint32_t));
printf("Channel: %i\n", (int) chan);
return 0;
}
@ -272,7 +272,7 @@ int channel_cmd(int argc, char **argv)
return -1;
}
chan = atoi(argv[2]);
netdev->driver->set(netdev, NETOPT_CHANNEL, &chan, sizeof(uint32_t));
netdev->driver->set(netdev, NETOPT_CHANNEL_FREQUENCY, &chan, sizeof(uint32_t));
printf("New channel set\n");
}
else {