This commit is contained in:
2026-05-11 12:18:14 +02:00
parent 5d20d2820a
commit fca4aeb115
7 changed files with 27 additions and 16 deletions

View File

@@ -1,4 +1,4 @@
if(CONFIG_AUDIO)
if(CONFIG_BUZZ_AUDIO)
zephyr_library()
zephyr_library_sources(src/audio.c)
zephyr_include_directories(include)

View File

@@ -1,10 +1,10 @@
menuconfig AUDIO
menuconfig BUZZ_AUDIO
bool "Audio handling"
default y
select I2S
select POLL
if AUDIO
if BUZZ_AUDIO
config AUDIO_NO_SAMPLES_SAMPLE
string "Audio no samples sample"
default "404"
@@ -57,4 +57,4 @@ if AUDIO
module = AUDIO
module-str = audio
source "subsys/logging/Kconfig.template.log_config"
endif # AUDIO
endif # BUZZ_AUDIO

View File

@@ -1,5 +1,6 @@
#include <zephyr/fs/littlefs.h>
#include <zephyr/fs/fs.h>
#include <zephyr/storage/flash_map.h>
#include <zephyr/sys/byteorder.h>
#include <zephyr/logging/log.h>
#include <zephyr/pm/device.h>
@@ -11,7 +12,14 @@
LOG_MODULE_REGISTER(fs_mgmt, CONFIG_FS_MGMT_LOG_LEVEL);
#define FS_PARTITION_ID FLASH_AREA_ID(littlefs_storage)
/* Prefer external LittleFS partition when present, otherwise internal storage partition. */
#if DT_NODE_EXISTS(DT_NODELABEL(ext_flash_lfs))
#define FS_PARTITION_ID FIXED_PARTITION_ID(ext_flash_lfs)
#elif DT_NODE_EXISTS(DT_NODELABEL(storage_partition))
#define FS_PARTITION_ID FIXED_PARTITION_ID(storage_partition)
#else
#error "No compatible LittleFS partition node label found (expected ext_flash_lfs or storage_partition)"
#endif
FS_LITTLEFS_DECLARE_DEFAULT_CONFIG(fs_storage_data);
#define EXTERNAL_FLASH_NODE DT_ALIAS(external_flash)