Hello, im trying to use the function “write_partition” to write a node id with command line. I saw this definition:
typedef enum {
PARTITION_0 = 0,
TABLE_0_0,
TABLE_0_1,
PARTITION_1,
TABLE_1_0,
TABLE_1_1,
}partition_index;
Also, to save the parameters of the LoRa communication we have:
g_lora_config.lorap2p_param.Frequency = atoi(argv[1]);
g_lora_config.lorap2p_param.Spreadfact = atoi(argv[2]);
g_lora_config.lorap2p_param.Bandwidth = atoi(argv[3]);
.........
write_partition(PARTITION_0, (char *)&g_lora_config, sizeof(g_lora_config));
e_printf("OK \r\n");
So my question is, where (partition or table) i need use to save s “Node ID” number ?
Edit:
Im trying to do something like this:
NodeID[0] = atoi(argv[1]);
NodeID[1] = atoi(argv[2]);
NodeID[2] = atoi(argv[3]);
write_partition(PARTITION_0, (char *)&NodeID, sizeof(NodeID));
e_printf("Node ID Saved in RAK811 \r\n");
But my main problem is WHERE save the information. PARTITION_1 and PARTITION_0 are used.