added python tool inital version

This commit is contained in:
2026-02-25 10:09:17 +01:00
parent 288b1e45ef
commit 80c0e825a7
26 changed files with 369 additions and 0 deletions

23
firmware/src/fs.c Normal file
View File

@@ -0,0 +1,23 @@
#include <zephyr/fs/littlefs.h>
#include <fs.h>
LOG_MODULE_REGISTER(buzz_fs, LOG_LEVEL_INF);
#define STORAGE_PARTITION_ID FIXED_PARTITION_ID(littlefs_storage)
FS_LITTLEFS_DECLARE_DEFAULT_CONFIG(fs_storage_data);
static struct fs_mount_t fs_storage_mnt = {
.type = FS_LITTLEFS,
.fs_data = &fs_storage_data,
.storage_dev = (void *)STORAGE_PARTITION_ID,
.mnt_point = "/lfs",
};
int fs_init(void) {
int rc = fs_mount(&fs_storage_mnt);
if (rc < 0) {
LOG_ERR("Error mounting filesystem: %d", rc);
return rc;
}
LOG_DBG("Filesystem mounted successfully");
return 0;
}