KT25-0812_82A-UART/apps/common/dev_manager/dev_reg.c

211 lines
5.8 KiB
C
Raw Normal View History

2025-08-12 10:09:23 +00:00
#include "dev_reg.h"
#include "app_config.h"
#if (TCFG_BS_DEV_PATH_EN)
#define SD0_BS_STORAGE_PATH "storage/bs_sd0"
#define SD0_BS_ROOT_PATH "storage/bs_sd0/C/"
#define SD1_BS_STORAGE_PATH "storage/bs_sd1"
#define SD1_BS_ROOT_PATH "storage/bs_sd1/C/"
#define UDISK0_BS_STORAGE_PATH "storage/bs_udisk0"
#define UDISK0_BS_ROOT_PATH "storage/bs_udisk0/C/"
#else
#define SD0_BS_STORAGE_PATH NULL
#define SD0_BS_ROOT_PATH NULL
#define SD1_BS_STORAGE_PATH NULL
#define SD1_BS_ROOT_PATH NULL
#define UDISK0_BS_STORAGE_PATH NULL
#define UDISK0_BS_ROOT_PATH NULL
#endif
//*----------------------------------------------------------------------------*/
/**@brief 设备配置表
@param struct __dev_reg结构体描述
@return
@note
logo逻辑盘符sd0_rec/sd1_rec/udisk_rec是做录音文件夹区分使用的,
"_rec"
*/
/*----------------------------------------------------------------------------*/
const struct __dev_reg dev_reg[] = {
#if SDFILE_STORAGE && TCFG_CODE_FLASH_ENABLE
//内置flash
{
/*logo*/ SDFILE_DEV,
/*name*/ NULL,
/*storage_path*/ SDFILE_MOUNT_PATH,
/*bs_storage_path*/ NULL,
/*root_path*/ SDFILE_RES_ROOT_PATH,
/*bs_root_path*/ NULL,
/*fs_type*/ "sdfile"
},
#endif
#if FLASH_INSIDE_REC_ENABLE
//内置录音
{
/*logo*/ "rec_sdfile",
/*name*/ NULL,
/*storage_path*/ "mnt/rec_sdfile",
/*bs_storage_path*/ NULL,
/*root_path*/ "mnt/rec_sdfile/C/",
/*bs_root_path*/ NULL,
/*fs_type*/ "rec_sdfile"
},
#endif
#if (TCFG_SD0_ENABLE)
//sd0
{
/*logo*/ "sd0",
/*name*/ "sd0",
/*storage_path*/ "storage/sd0",
/*bs_storage_path*/ SD0_BS_STORAGE_PATH,
/*root_path*/ "storage/sd0/C/",
/*bs_root_path*/ SD0_BS_ROOT_PATH,
/*fs_type*/ "fat"
},
#endif
#if (TCFG_SD1_ENABLE)
//sd1
{
/*logo*/ "sd1",
/*name*/ "sd1",
/*storage_path*/ "storage/sd1",
/*bs_storage_path*/ SD1_BS_STORAGE_PATH,
/*root_path*/ "storage/sd1/C/",
/*bs_root_path*/ SD1_BS_ROOT_PATH,
/*fs_type*/ "fat"
},
#endif
#if (TCFG_UDISK_ENABLE)
//u盘
{
/*logo*/ "udisk0",
/*name*/ "udisk0",
/*storage_path*/ "storage/udisk0",
/*bs_storage_path*/ UDISK0_BS_STORAGE_PATH,
/*root_path*/ "storage/udisk0/C/",
/*bs_root_path*/ UDISK0_BS_ROOT_PATH,
/*fs_type*/ "fat"
},
#endif
#if (TCFG_SD0_ENABLE && TCFG_RECORD_FOLDER_DEV_ENABLE)
//sd0录音文件夹分区
{
/*logo*/ "sd0_rec",
/*name*/ "sd0",
/*storage_path*/ "storage/sd0",
/*bs_storage_path*/ NULL,
/*root_path*/ "storage/sd0/C/"REC_FOLDER_NAME,
/*bs_root_path*/ NULL,
/*fs_type*/ "fat"
},
#endif
#if (TCFG_SD1_ENABLE && TCFG_RECORD_FOLDER_DEV_ENABLE)
//sd1录音文件夹分区
{
/*logo*/ "sd1_rec",
/*name*/ "sd1",
/*storage_path*/ "storage/sd1",
/*bs_storage_path*/ NULL,
/*root_path*/ "storage/sd1/C/"REC_FOLDER_NAME,
/*bs_root_path*/ NULL,
/*fs_type*/ "fat"
},
#endif
#if (TCFG_UDISK_ENABLE && TCFG_RECORD_FOLDER_DEV_ENABLE)
//u盘录音文件夹分区
{
/*logo*/ "udisk0_rec",
/*name*/ "udisk0",
/*storage_path*/ "storage/udisk0",
/*bs_storage_path*/ NULL,
/*root_path*/ "storage/udisk0/C/"REC_FOLDER_NAME,
/*bs_root_path*/ NULL,
/*fs_type*/ "fat"
},
#endif
#if TCFG_NOR_FAT
//外挂fat分区
{
/*logo*/ "fat_nor",
/*name*/ "fat_nor",
/*storage_path*/ "storage/fat_nor",
/*bs_storage_path*/ NULL,
/*root_path*/ "storage/fat_nor/C/",
/*bs_root_path*/ NULL,
/*fs_type*/ "fat"
},
#endif
#if TCFG_NOR_FS
//外挂flash资源分区
{
/*logo*/ "res_nor",
/*name*/ "res_nor",
/*storage_path*/ "storage/res_nor",
/*bs_storage_path*/ NULL,
/*root_path*/ "storage/res_nor/C/",
/*bs_root_path*/ NULL,
/*fs_type*/ "nor_sdfile"
},
#endif
#if TCFG_NOR_REC
///外挂录音分区
{
/*logo*/ "rec_nor",
/*name*/ "rec_nor",
/*storage_path*/ "storage/rec_nor",
/*bs_storage_path*/ NULL,
/*root_path*/ "storage/rec_nor/C/",
/*bs_root_path*/ NULL,
/*fs_type*/ "rec_fs"
},
#endif
{
/*logo*/ "nor_ui",
/*name*/ "nor_ui",
/*storage_path*/ "storage/nor_ui",
/*bs_storage_path*/ NULL,
/*root_path*/ "storage/nor_ui/C/",
/*bs_root_path*/ NULL,
/*fs_type*/ "nor_sdfile"
},
#if TCFG_VIR_UDISK_ENABLE
// 虚拟U盘
{
/*logo*/ "vir_udisk0",
/*name*/ "vir_udisk0",
/*storage_path*/ "storage/vir_udisk0",
/*bs_storage_path*/ NULL,
/*root_path*/ "storage/vir_udisk0/C/",
/*bs_root_path*/ NULL,
/*fs_type*/ "fat"
},
#endif
#if TCFG_VIRFAT_FLASH_ENABLE
//flash 虚拟fat
{
/*logo*/ "virfat_flash",
/*name*/ "virfat_flash",
/*storage_path*/ "storage/virfat_flash",
/*bs_storage_path*/ NULL,
/*root_path*/ "storage/virfat_flash/C/",
/*bs_root_path*/ NULL,
/*fs_type*/ "sdfile_fat"
},
#endif
//<新加设备参数请在reg end前添加!!
//<reg end
{
/*logo*/ NULL,
/*name*/ NULL,
/*storage_path*/ NULL,
/*bs_storage_path*/ NULL,
/*root_path*/ NULL,
/*bs_root_path*/ NULL,
/*fs_type*/ NULL
},
};