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

add name to sysconfig

there is still quite some space left on the persistent flash config area, make it possible to give nodes a name (e.g. hostname of the meshrouter) for nicer debugging
This commit is contained in:
Benjamin Valentin 2014-02-06 02:38:01 +01:00
parent 48b5dacde8
commit bbe616f167
2 changed files with 3 additions and 0 deletions

View File

@ -22,6 +22,7 @@
#include <stdint.h>
#define CONFIG_KEY (0x1701)
#define CONFIG_NAME_LEN (10)
extern char configmem[];
@ -30,6 +31,7 @@ typedef struct {
uint16_t id; ///< unique node identifier
uint8_t radio_address; ///< address for radio communication
uint8_t radio_channel; ///< current frequency
char name[CONFIG_NAME_LEN]; ///< name of the node
} config_t;
/* @brief: Element to store in flashrom */

View File

@ -22,4 +22,5 @@ config_t sysconfig = {
0, ///< default ID
0, ///< default radio address
0, ///< default radio channel
"foobar", ///< default name
};