1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00
RIOT/sys/shell/id.c

18 lines
368 B
C
Raw Normal View History

#include <stdio.h>
#include <config.h>
void _id_handler(char *id) {
uint16_t newid;
if (sscanf(id, "id %hu", &newid) == 1) {
printf("Setting new id %u\n", newid);
sysconfig.id = newid;
if (!config_save()) {
puts("ERROR setting new id");
}
}
else {
printf("Current id: %u\n", sysconfig.id);
}
}