/Zephyr-Core-2.7.6/subsys/fs/nvs/ |
D | nvs.c | 12 #include <fs/nvs.h> 20 /* nvs_al_size returns size aligned to fs->write_block_size */ 21 static inline size_t nvs_al_size(struct nvs_fs *fs, size_t len) in nvs_al_size() argument 23 uint8_t write_block_size = fs->flash_parameters->write_block_size; in nvs_al_size() 34 static int nvs_flash_al_wrt(struct nvs_fs *fs, uint32_t addr, const void *data, in nvs_flash_al_wrt() argument 48 offset = fs->offset; in nvs_flash_al_wrt() 49 offset += fs->sector_size * (addr >> ADDR_SECT_SHIFT); in nvs_flash_al_wrt() 52 blen = len & ~(fs->flash_parameters->write_block_size - 1U); in nvs_flash_al_wrt() 54 rc = flash_write(fs->flash_device, offset, data8, blen); in nvs_flash_al_wrt() 65 (void)memset(buf + len, fs->flash_parameters->erase_value, in nvs_flash_al_wrt() [all …]
|
/Zephyr-Core-2.7.6/subsys/net/l2/ieee802154/ |
D | ieee802154_frame.c | 19 #define dbg_print_fs(fs) \ argument 20 NET_DBG("fs(1): %u/%u/%u/%u/%u/%u", \ 21 fs->fc.frame_type, fs->fc.security_enabled, \ 22 fs->fc.frame_pending, fs->fc.ar, fs->fc.pan_id_comp, \ 23 fs->fc.reserved); \ 24 NET_DBG("fs(2): %u/%u/%u/%u/%u - %u", \ 25 fs->fc.seq_num_suppr, fs->fc.ie_list, \ 26 fs->fc.dst_addr_mode, fs->fc.frame_version, \ 27 fs->fc.src_addr_mode, fs->sequence) 43 struct ieee802154_fcf_seq *fs = (struct ieee802154_fcf_seq *)buf; in ieee802154_validate_fc_seq() local [all …]
|
D | ieee802154_radio_utils.h | 29 struct ieee802154_fcf_seq *fs; in prepare_for_ack() local 31 fs = (struct ieee802154_fcf_seq *)frag->data; in prepare_for_ack() 33 ctx->ack_seq = fs->sequence; in prepare_for_ack() 72 struct ieee802154_fcf_seq *fs; in handle_ack() local 74 fs = ieee802154_validate_fc_seq(net_pkt_data(pkt), NULL, &len); in handle_ack() 75 if (!fs || fs->sequence != ctx->ack_seq) { in handle_ack()
|
/Zephyr-Core-2.7.6/subsys/fs/ |
D | littlefs_fs.c | 13 #include <fs/fs.h> 14 #include <fs/fs_sys.h> 20 #include <fs/littlefs.h> 71 static inline void fs_lock(struct fs_littlefs *fs) in fs_lock() argument 73 k_mutex_lock(&fs->mutex, K_FOREVER); in fs_lock() 76 static inline void fs_unlock(struct fs_littlefs *fs) in fs_unlock() argument 78 k_mutex_unlock(&fs->mutex); in fs_unlock() 219 struct fs_littlefs *fs = fp->mp->fs_data; in littlefs_open() local 220 struct lfs *lfs = &fs->lfs; in littlefs_open() 241 fs_lock(fs); in littlefs_open() [all …]
|
D | fs.c | 14 #include <fs/fs.h> 15 #include <fs/fs_sys.h> 22 LOG_MODULE_REGISTER(fs); 161 CHECKIF(mp->fs->open == NULL) { in fs_open() 166 rc = mp->fs->open(zfp, file_name, flags); in fs_open() 184 CHECKIF(zfp->mp->fs->close == NULL) { in fs_close() 188 rc = zfp->mp->fs->close(zfp); in fs_close() 207 CHECKIF(zfp->mp->fs->read == NULL) { in fs_read() 211 rc = zfp->mp->fs->read(zfp, ptr, size); in fs_read() 227 CHECKIF(zfp->mp->fs->write == NULL) { in fs_write() [all …]
|
D | Kconfig | 14 module = FS 15 module-str = fs 19 bool "Link 'app' with FS" 22 Add FS header files to the 'app' include path. It may be 23 disabled if the include paths for FS are causing aliasing 60 source "subsys/fs/Kconfig.fatfs" 61 source "subsys/fs/Kconfig.littlefs" 65 source "subsys/fs/fcb/Kconfig" 66 source "subsys/fs/nvs/Kconfig"
|
D | CMakeLists.txt | 4 zephyr_interface_library_named(FS) 8 zephyr_library_sources(fs.c fs_impl.c) 13 zephyr_library_link_libraries(FS) 15 target_link_libraries_ifdef(CONFIG_FAT_FILESYSTEM_ELM FS INTERFACE ELMFAT) 16 target_link_libraries_ifdef(CONFIG_FILE_SYSTEM_LITTLEFS FS INTERFACE LITTLEFS)
|
/Zephyr-Core-2.7.6/tests/subsys/fs/nvs/src/ |
D | main.c | 26 #include <fs/nvs.h> 33 static struct nvs_fs fs; variable 43 if (fs.sector_count != 0) { in setup() 46 err = nvs_clear(&fs); in setup() 70 fs.offset = TEST_FLASH_AREA_STORAGE_OFFSET; in test_nvs_init() 71 err = flash_get_page_info_by_offs(flash_area_get_device(fa), fs.offset, in test_nvs_init() 75 fs.sector_size = info.size; in test_nvs_init() 76 fs.sector_count = TEST_SECTOR_COUNT; in test_nvs_init() 78 err = nvs_init(&fs, DT_CHOSEN_ZEPHYR_FLASH_CONTROLLER_LABEL); in test_nvs_init() 89 len = nvs_read(&fs, id, rd_buf, sizeof(rd_buf)); in execute_long_pattern_write() [all …]
|
/Zephyr-Core-2.7.6/samples/subsys/shell/fs/ |
D | README.rst | 1 .. _shell-fs-sample: 31 :zephyr-app: samples/subsys/shell/fs 42 :zephyr-app: samples/subsys/shell/fs 54 :zephyr-app: samples/subsys/shell/fs 63 All file system related commands are available as sub-commands of fs. 69 fs mount littlefs /lfs 81 fs mount (littlefs|fat) <path> 90 fs ls [path] 99 fs cd [path] 108 fs pwd [all …]
|
/Zephyr-Core-2.7.6/tests/subsys/fs/fat_fs_api/src/ |
D | test_fat_rd_only_mount.c | 23 struct fs_file_t fs; in test_prepare() local 25 fs_file_t_init(&fs); in test_prepare() 27 zassert_equal(fs_open(&fs, "/NAND:/testfile.txt", FS_O_CREATE), in test_prepare() 29 zassert_equal(fs_close(&fs), 0, NULL); in test_prepare() 40 struct fs_file_t fs; in test_ops_on_rd() local 43 fs_file_t_init(&fs); in test_ops_on_rd() 44 /* Check fs operation on volume mounted with FS_MOUNT_FLAG_READ_ONLY */ in test_ops_on_rd() 51 ret = fs_open(&fs, "/NAND:/nosome", FS_O_CREATE); in test_ops_on_rd() 59 ret = fs_open(&fs, "/NAND:/testfile.txt", FS_O_RDWR); in test_ops_on_rd() 61 ret = fs_open(&fs, "/NAND:/testfile.txt", FS_O_READ); in test_ops_on_rd() [all …]
|
/Zephyr-Core-2.7.6/tests/subsys/fs/littlefs/src/ |
D | testfs_mount_flags.c | 8 #include <fs/littlefs.h> 27 struct fs_file_t fs; in test_fs_mount_flags() local 29 fs_file_t_init(&fs); in test_fs_mount_flags() 50 ret = fs_open(&fs, "/sml/some", FS_O_CREATE); in test_fs_mount_flags() 52 fs_close(&fs); in test_fs_mount_flags() 60 /* Check fs operation on volume mounted with FS_MOUNT_FLAG_READ_ONLY */ in test_fs_mount_flags() 67 ret = fs_open(&fs, "/sml/nosome", FS_O_CREATE); in test_fs_mount_flags() 75 ret = fs_open(&fs, "/sml/other", FS_O_CREATE); in test_fs_mount_flags() 77 ret = fs_open(&fs, "/sml/some", FS_O_RDWR); in test_fs_mount_flags() 79 ret = fs_open(&fs, "/sml/some", FS_O_READ); in test_fs_mount_flags() [all …]
|
/Zephyr-Core-2.7.6/tests/subsys/fs/fs_api/src/ |
D | test_fs_mount_flags.c | 21 struct fs_file_t fs; in test_mount_flags() local 23 fs_file_t_init(&fs); in test_mount_flags() 31 ret = fs_open(&fs, TEST_FS_MNTP"/some", FS_O_CREATE); in test_mount_flags() 34 ret = fs_close(&fs); in test_mount_flags() 42 /* Check fs operation on volume mounted with FS_MOUNT_FLAG_READ_ONLY */ in test_mount_flags() 49 ret = fs_open(&fs, TEST_FS_MNTP"/nosome", FS_O_CREATE); in test_mount_flags() 57 ret = fs_open(&fs, TEST_FS_MNTP"/other", FS_O_CREATE); in test_mount_flags() 59 ret = fs_open(&fs, TEST_FS_MNTP"/some", FS_O_RDWR); in test_mount_flags() 61 ret = fs_open(&fs, TEST_FS_MNTP"/some", FS_O_READ); in test_mount_flags() 63 ret = fs_close(&fs); in test_mount_flags()
|
/Zephyr-Core-2.7.6/tests/subsys/settings/fs/src/ |
D | settings_test_save_one_file.c | 30 zassert_true(rc == 0, "can't register FS as configuration source"); in test_config_save_one_file() 34 "can't register FS as configuration destination"); in test_config_save_one_file() 38 zassert_true(rc == 0, "fs write error"); in test_config_save_one_file() 41 zassert_equal(rc, 0, "fs one item write error"); in test_config_save_one_file() 44 zassert_true(rc == 0, "fs redout error"); in test_config_save_one_file() 48 zassert_true(rc == 0, "fs one item write error"); in test_config_save_one_file() 51 zassert_true(rc == 0, "fs redout error"); in test_config_save_one_file()
|
D | settings_test_empty_file.c | 10 #include <fs/fs.h> 26 zassert_true(rc == 0, "can't register FS as configuration source"); in test_config_empty_file() 28 zassert_true(rc == 0, "can't register FS as configuration source"); in test_config_empty_file()
|
D | settings_test_save_in_file.c | 30 zassert_true(rc == 0, "can't register FS as configuration source"); in test_config_save_in_file() 34 "can't register FS as configuration destination"); in test_config_save_in_file() 38 zassert_true(rc == 0, "fs write error"); in test_config_save_in_file() 46 zassert_true(rc == 0, "fs write error"); in test_config_save_in_file()
|
/Zephyr-Core-2.7.6/include/fs/ |
D | nvs.h | 75 * @param fs Pointer to file system 80 int nvs_init(struct nvs_fs *fs, const char *dev_name); 86 * @param fs Pointer to file system 90 int nvs_clear(struct nvs_fs *fs); 97 * @param fs Pointer to file system 106 ssize_t nvs_write(struct nvs_fs *fs, uint16_t id, const void *data, size_t len); 113 * @param fs Pointer to file system 118 int nvs_delete(struct nvs_fs *fs, uint16_t id); 125 * @param fs Pointer to file system 135 ssize_t nvs_read(struct nvs_fs *fs, uint16_t id, void *data, size_t len); [all …]
|
/Zephyr-Core-2.7.6/samples/subsys/nvs/src/ |
D | main.c | 47 #include <fs/nvs.h> 49 static struct nvs_fs fs; variable 86 fs.offset = FLASH_AREA_OFFSET(storage); in main() 87 rc = flash_get_page_info_by_offs(flash_dev, fs.offset, &info); in main() 92 fs.sector_size = info.size; in main() 93 fs.sector_count = 3U; in main() 95 rc = nvs_init(&fs, flash_dev->name); in main() 105 rc = nvs_read(&fs, ADDRESS_ID, &buf, sizeof(buf)); in main() 112 (void)nvs_write(&fs, ADDRESS_ID, &buf, strlen(buf)+1); in main() 116 rc = nvs_read(&fs, KEY_ID, &key, sizeof(key)); in main() [all …]
|
/Zephyr-Core-2.7.6/tests/subsys/fs/multi-fs/src/ |
D | test_fs_shell.c | 33 test_shell_exec("help fs", -EINVAL); in test_fs_help() 34 test_shell_exec("fs mount fat", -EINVAL); in test_fs_help() 35 test_shell_exec("fs mount littlefs", -EINVAL); in test_fs_help() 43 test_shell_exec("fs mount fat /RAM:", 0); in test_fs_fat_mount() 47 test_shell_exec("fs mount littlefs /littlefs", 0); in test_fs_littlefs_mount()
|
D | test_littlefs_mount.c | 10 #include <fs/fs.h> 12 #include <fs/littlefs.h>
|
/Zephyr-Core-2.7.6/tests/posix/fs/ |
D | testcase.yaml | 6 portability.posix.fs: 9 portability.posix.fs.newlib: 13 portability.posix.fs.tls: 18 portability.posix.fs.tls.newlib:
|
/Zephyr-Core-2.7.6/doc/reference/file_system/ |
D | index.rst | 21 int fs_register(int type, const struct fs_file_system_t *fs); 23 int fs_unregister(int type, const struct fs_file_system_t *fs); 50 Samples for the VFS are mainly supplied in ``samples/subsys/fs``, although various examples of the 54 - ``samples/subsys/fs/fat_fs`` is an example of FAT file system usage with SDHC media; 55 - ``samples/subsys/shell/fs`` is an example of Shell fs subsystem, using internal flash partition 57 - ``samples/subsys/usb/mass/`` example of USB Mass Storage device that uses FAT FS driver with RAM
|
/Zephyr-Core-2.7.6/samples/subsys/nvs/ |
D | README.rst | 43 [fs/nvs] [DBG] nvs_reinit: (Re)Initializing sectors 44 [fs/nvs] [DBG] _nvs_sector_init: f->write_location set to c 45 [fs/nvs] [INF] nvs_init: maximum storage length 256 byte 46 [fs/nvs] [INF] nvs_init: write-align: 1, write-addr: c 47 [fs/nvs] [INF] nvs_init: entry sector: 0, entry sector ID: 1 57 [fs/nvs] [INF] nvs_init: maximum storage length 256 byte 58 [fs/nvs] [INF] nvs_init: write-align: 1, write-addr: c7 59 [fs/nvs] [INF] nvs_init: entry sector: 0, entry sector ID: 1
|
/Zephyr-Core-2.7.6/tests/subsys/logging/log_backend_fs/ |
D | testcase.yaml | 4 tags: logging backend filesystem fs 7 tags: logging backend filesystem fs 11 tags: logging backend filesystem fs 15 tags: logging backend filesystem fs
|
/Zephyr-Core-2.7.6/tests/posix/fs/src/ |
D | test_fat_mount.c | 7 #include <fs/fs.h> 27 TC_PRINT("Error mounting fs [%d]\n", res); in test_mount()
|
/Zephyr-Core-2.7.6/tests/subsys/settings/littlefs/src/ |
D | settings_setup_littlefs.c | 9 #include <fs/fs.h> 10 #include <fs/littlefs.h>
|