Improve savedata module

This commit is contained in:
whowechina
2026-04-12 11:58:01 +08:00
parent c7b1982e06
commit bed3d689fa
8 changed files with 121 additions and 91 deletions
+9 -1
View File
@@ -7,8 +7,9 @@
#include "pico/stdio.h"
#include "pico/stdlib.h"
#include "pico/bootrom.h"
#include "pico/unique_id.h"
#include "cli.h"
#include "save.h"
#define MAX_COMMANDS 32
#define MAX_PARAMETERS 10
@@ -24,6 +25,13 @@ static int max_cmd_len = 0;
static int num_commands = 0;
uint64_t board_id_64()
{
pico_unique_board_id_t id;
pico_get_unique_board_id(&id);
return *(uint64_t *)(id.id);
}
void cli_register(const char *cmd, cmd_handler_t handler, const char *help)
{
if (num_commands < MAX_COMMANDS) {