Home
last modified time | relevance | path

Searched full:fa (Results 1 – 25 of 60) sorted by relevance

123

/Zephyr-Core-3.5.0/subsys/storage/flash_map/
Dflash_map.c51 void flash_area_close(const struct flash_area *fa) in flash_area_close() argument
56 int flash_area_read(const struct flash_area *fa, off_t off, void *dst, in flash_area_read() argument
59 if (!is_in_flash_area_bounds(fa, off, len)) { in flash_area_read()
63 return flash_read(fa->fa_dev, fa->fa_off + off, dst, len); in flash_area_read()
66 int flash_area_write(const struct flash_area *fa, off_t off, const void *src, in flash_area_write() argument
69 if (!is_in_flash_area_bounds(fa, off, len)) { in flash_area_write()
73 return flash_write(fa->fa_dev, fa->fa_off + off, (void *)src, len); in flash_area_write()
76 int flash_area_erase(const struct flash_area *fa, off_t off, size_t len) in flash_area_erase() argument
78 if (!is_in_flash_area_bounds(fa, off, len)) { in flash_area_erase()
82 return flash_erase(fa->fa_dev, fa->fa_off + off, len); in flash_area_erase()
[all …]
Dflash_map_shell.c23 static void fa_cb(const struct flash_area *fa, void *user_data) in fa_cb() argument
27 const char *fa_label = flash_area_label(fa); in fa_cb()
32 shell_print(sh, "%2d 0x%0*" PRIxPTR " %-26s %-24.24s 0x%-10x 0x%-12x", (int)fa->fa_id, in fa_cb()
33 sizeof(uintptr_t) * 2, (uintptr_t)fa->fa_dev, fa->fa_dev->name, fa_label, in fa_cb()
34 (uint32_t)fa->fa_off, fa->fa_size); in fa_cb()
36 shell_print(sh, "%2d 0x%0*" PRIxPTR " %-26s 0x%-10x 0x%-12x", (int)fa->fa_id, in fa_cb()
37 sizeof(uintptr_t) * 2, (uintptr_t)fa->fa_dev, fa->fa_dev->name, in fa_cb()
38 (uint32_t)fa->fa_off, fa->fa_size); in fa_cb()
Dflash_map_layout.c72 const struct flash_area *fa; in flash_area_layout() local
73 int rc = flash_area_open(idx, &fa); in flash_area_layout()
75 if (rc < 0 || fa == NULL) { in flash_area_layout()
80 cb_data->area_off = fa->fa_off; in flash_area_layout()
81 cb_data->area_len = fa->fa_size; in flash_area_layout()
88 flash_dev = fa->fa_dev; in flash_area_layout()
89 flash_area_close(fa); in flash_area_layout()
Dflash_map_integrity.c32 int flash_area_check_int_sha256(const struct flash_area *fa, in flash_area_check_int_sha256() argument
46 if (fa == NULL || fac == NULL || fac->match == NULL || in flash_area_check_int_sha256()
51 if (!is_in_flash_area_bounds(fa, fac->off, fac->clen)) { in flash_area_check_int_sha256()
81 rc = flash_read(fa->fa_dev, (fa->fa_off + fac->off + pos), in flash_area_check_int_sha256()
Dflash_map_priv.h33 static inline bool is_in_flash_area_bounds(const struct flash_area *fa, in is_in_flash_area_bounds() argument
36 return (off >= 0) && ((off + len) <= fa->fa_size); in is_in_flash_area_bounds()
/Zephyr-Core-3.5.0/tests/subsys/storage/flash_map/src/
Dmain.c22 const struct flash_area *fa; in ZTEST() local
26 rc = flash_area_open(FIXED_PARTITION_ID(disabled_a), &fa); in ZTEST()
28 rc = flash_area_open(FIXED_PARTITION_ID(disabled_b), &fa); in ZTEST()
37 const struct flash_area *fa; in ZTEST() local
47 rc = flash_area_open(SLOT1_PARTITION_ID, &fa); in ZTEST()
51 flash_dev = flash_area_get_device(fa); in ZTEST()
53 /* Device obtained by label should match the one from fa object */ in ZTEST()
56 rc = flash_erase(flash_dev, fa->fa_off, fa->fa_size); in ZTEST()
68 rc = flash_area_write(fa, off, wd, sizeof(wd)); in ZTEST()
72 rc = flash_read(flash_dev, fa->fa_off + off, rd, sizeof(rd)); in ZTEST()
[all …]
/Zephyr-Core-3.5.0/tests/subsys/dfu/mcuboot/src/
Dmain.c27 const struct flash_area *fa; in ZTEST() local
33 ret = flash_area_open(SLOT1_PARTITION_ID, &fa); in ZTEST()
39 for (offs = 0; offs < fa->fa_size; offs += sizeof(temp)) { in ZTEST()
40 ret = flash_area_read(fa, offs, &temp, sizeof(temp)); in ZTEST()
43 ret = flash_area_write(fa, offs, &temp2, sizeof(temp)); in ZTEST()
51 for (offs = 0; offs < fa->fa_size; offs += sizeof(temp)) { in ZTEST()
52 ret = flash_area_read(fa, offs, &temp, sizeof(temp)); in ZTEST()
60 const struct flash_area *fa; in ZTEST() local
72 ret = flash_area_open(SLOT1_PARTITION_ID, &fa); in ZTEST()
80 ret = flash_area_read(fa, fa->fa_size - sizeof(expectation), in ZTEST()
[all …]
/Zephyr-Core-3.5.0/tests/subsys/dfu/mcuboot_multi/src/
Dmain.c20 static void erase_image_status_page(const struct flash_area *fa) in erase_image_status_page() argument
26 sf_dev = flash_area_get_device(fa); in erase_image_status_page()
29 ret = flash_get_page_info_by_offs(sf_dev, fa->fa_off + fa->fa_size - 1, in erase_image_status_page()
39 const struct flash_area *fa; in _test_request_upgrade_n() local
51 ret = flash_area_open(fa_id, &fa); in _test_request_upgrade_n()
54 erase_image_status_page(fa); in _test_request_upgrade_n()
60 ret = flash_area_read(fa, fa->fa_size - sizeof(expectation), in _test_request_upgrade_n()
88 const struct flash_area *fa; in _test_write_confirm_n() local
94 ret = flash_area_open(fa_id, &fa); in _test_write_confirm_n()
97 erase_image_status_page(fa); in _test_write_confirm_n()
[all …]
/Zephyr-Core-3.5.0/tests/drivers/coredump/coredump_api/
Dtestcase.yaml19 - "E: #CD:5([aA])45([0-9a-fA-F]+)"
20 - "E: #CD:4([dD])([0-9a-fA-F]+)"
21 - "E: #CD:4([dD])([0-9a-fA-F]+)"
22 - "E: #CD:4([dD])([0-9a-fA-F]+)"
24 - "E: #CD:4([dD])([0-9a-fA-F]+)"
26 - "E: #CD:4([dD])([0-9a-fA-F]+)"
28 - "E: #CD:4([dD])([0-9a-fA-F]+)"
30 - "E: #CD:4([dD])([0-9a-fA-F]+)"
44 - "E: #CD:5([aA])45([0-9a-fA-F]+)"
45 - "E: #CD:4([dD])([0-9a-fA-F]+)"
[all …]
/Zephyr-Core-3.5.0/subsys/mgmt/mcumgr/grp/img_mgmt/src/
Dzephyr_img_mgmt.c52 * @param fa pointer to flash area to scan
56 static int img_mgmt_flash_check_empty_inner(const struct flash_area *fa) in img_mgmt_flash_check_empty_inner() argument
67 assert(fa->fa_size % 4 == 0); in img_mgmt_flash_check_empty_inner()
69 erased_val = flash_area_erased_val(fa); in img_mgmt_flash_check_empty_inner()
72 end = fa->fa_size; in img_mgmt_flash_check_empty_inner()
80 rc = flash_area_read(fa, addr, data, bytes_to_read); in img_mgmt_flash_check_empty_inner()
105 const struct flash_area *fa; in img_mgmt_flash_check_empty() local
108 rc = flash_area_open(fa_id, &fa); in img_mgmt_flash_check_empty()
110 rc = img_mgmt_flash_check_empty_inner(fa); in img_mgmt_flash_check_empty()
112 flash_area_close(fa); in img_mgmt_flash_check_empty()
[all …]
/Zephyr-Core-3.5.0/doc/
Dindex.rst45 <span class="grid-icon fa fa-map-signs"></span>
53 <span class="grid-icon fa fa-github"></span>
61 <span class="grid-icon fa fa-cogs"></span>
69 <span class="grid-icon fa fa-sign-in"></span>
76 <span class="grid-icon fa fa-lock"></span>
83 <span class="grid-icon fa fa-object-group"></span>
90 <span class="grid-icon fa fa-puzzle-piece"></span>
/Zephyr-Core-3.5.0/subsys/dfu/boot/
Dmcuboot.c63 const struct flash_area *fa; in boot_read_v1_header() local
66 rc = flash_area_open(area_id, &fa); in boot_read_v1_header()
74 rc = flash_area_read(fa, 0, v1_raw, sizeof(*v1_raw)); in boot_read_v1_header()
75 flash_area_close(fa); in boot_read_v1_header()
189 const struct flash_area *fa; in boot_is_img_confirmed() local
192 rc = flash_area_open(FLASH_AREA_IMAGE_PRIMARY, &fa); in boot_is_img_confirmed()
197 rc = boot_read_swap_state(fa, &state); in boot_is_img_confirmed()
240 const struct flash_area *fa; in boot_erase_img_bank() local
243 rc = flash_area_open(area_id, &fa); in boot_erase_img_bank()
248 rc = flash_area_erase(fa, 0, fa->fa_size); in boot_erase_img_bank()
[all …]
/Zephyr-Core-3.5.0/include/zephyr/storage/
Dflash_map.h105 * @param[in] fa Flash area
110 int flash_area_check_int_sha256(const struct flash_area *fa,
120 * @param[out] fa Pointer which has to reference flash_area. If
127 int flash_area_open(uint8_t id, const struct flash_area **fa);
135 * @param[in] fa Flash area to be closed.
137 void flash_area_close(const struct flash_area *fa);
146 * @param[in] fa Flash area
153 int flash_area_read(const struct flash_area *fa, off_t off, void *dst,
163 * @param[in] fa Flash area
170 int flash_area_write(const struct flash_area *fa, off_t off, const void *src,
[all …]
/Zephyr-Core-3.5.0/subsys/mgmt/mcumgr/grp/zephyr_basic/src/
Dbasic_mgmt.c23 const struct flash_area *fa; in storage_erase() local
24 int rc = flash_area_open(ERASE_TARGET_ID, &fa); in storage_erase()
30 if (flash_area_get_device(fa) == NULL) { in storage_erase()
34 rc = flash_area_erase(fa, 0, fa->fa_size); in storage_erase()
42 flash_area_close(fa); in storage_erase()
/Zephyr-Core-3.5.0/tests/subsys/debug/coredump/
Dtestcase.yaml16 - "E: #CD:5([aA])45([0-9a-fA-F]+)"
17 - "E: #CD:41([0-9a-fA-F]+)"
18 - "E: #CD:4([dD])([0-9a-fA-F]+)"
/Zephyr-Core-3.5.0/doc/_templates/
Dzversions.html4 <span class="fa fa-book"> Zephyr Project</span>
6 <span class="fa fa-caret-down"></span>
Dbreadcrumbs.html24 <a href="{{ vcs_url }}" class="fa fa-github"> {{ _('Open on GitHub') }}</a>
/Zephyr-Core-3.5.0/tests/subsys/dfu/img_util/src/
Dmain.c45 const struct flash_area *fa; in ZTEST() local
58 ret = flash_area_open(SLOT1_PARTITION_ID, &fa); in ZTEST()
66 ret = flash_area_write(fa, i * sizeof(erase_buf), erase_buf, in ZTEST()
72 ret = flash_area_write(fa, fa->fa_size - sizeof(erase_buf), erase_buf, in ZTEST()
95 ret = flash_area_open(SLOT1_PARTITION_ID, &fa); in ZTEST()
103 zassert(flash_area_read(fa, i, &temp, 1) == 0, "pass", "fail"); in ZTEST()
111 ret = flash_area_read(fa, fa->fa_size - sizeof(buf), buf, sizeof(buf)); in ZTEST()
/Zephyr-Core-3.5.0/tests/subsys/settings/fcb_init/src/
Dsettings_test_fcb_init.c104 const struct flash_area *fa; in test_prepare_storage() local
110 err = flash_area_open(TEST_PARTITION_ID, &fa); in test_prepare_storage()
113 err = flash_area_erase(fa, 0, fa->fa_size); in test_prepare_storage()
116 err = flash_area_open(CODE_PARTITION_ID, &fa); in test_prepare_storage()
119 dev = flash_area_get_device(fa); in test_prepare_storage()
/Zephyr-Core-3.5.0/tests/subsys/settings/fcb/src/
Dsettings_test_compress_reset.c15 struct flash_sector *fa; in ZTEST() local
61 fa = cf.cf_fcb.f_active.fe_sector; in ZTEST()
66 zassert_true(fa != cf.cf_fcb.f_active.fe_sector, in ZTEST()
87 zassert_true(fa == cf.cf_fcb.f_active.fe_sector, in ZTEST()
/Zephyr-Core-3.5.0/tests/subsys/fs/fcb/src/
Dmain.c152 const struct flash_area *fa; in ZTEST() local
157 rc = flash_area_open(TEST_FCB_FLASH_AREA_ID, &fa); in ZTEST()
160 dev = fa->fa_dev; in ZTEST()
161 flash_area_close(fa); in ZTEST()
/Zephyr-Core-3.5.0/scripts/west_commands/tests/nrf/
Dnrf5340_app_and_net.hex1 :020000040000FA
/Zephyr-Core-3.5.0/tests/bluetooth/mesh/blob_io_flash/src/
Dmain.c50 const struct flash_area *fa = NULL; in ZTEST() local
68 err = flash_area_open(SLOT1_PARTITION_ID, &fa); in ZTEST()
71 err = flash_area_erase(fa, 0, ARRAY_SIZE(ctrl_data)); in ZTEST()
74 err = flash_area_write(fa, 0, test_data, ARRAY_SIZE(ctrl_data)); in ZTEST()
77 err = flash_area_read(fa, 0, ctrl_data, ARRAY_SIZE(ctrl_data)); in ZTEST()
85 flash_area_close(fa); in ZTEST()
/Zephyr-Core-3.5.0/subsys/usb/device/class/dfu/
Dusb_dfu.c551 const struct flash_area *fa; in dfu_class_handle_to_host() local
554 &fa); in dfu_class_handle_to_host()
560 ret = flash_area_read(fa, dfu_data.bytes_sent, in dfu_class_handle_to_host()
562 flash_area_close(fa); in dfu_class_handle_to_host()
807 const struct flash_area *fa; in dfu_custom_handle_req() local
824 if (flash_area_open(dfu_data.flash_area_id, &fa)) { in dfu_custom_handle_req()
828 dfu_data.flash_upload_size = fa->fa_size; in dfu_custom_handle_req()
829 flash_area_close(fa); in dfu_custom_handle_req()
903 const struct flash_area *fa; in usb_dfu_init() local
914 if (flash_area_open(dfu_data.flash_area_id, &fa)) { in usb_dfu_init()
[all …]
/Zephyr-Core-3.5.0/tests/subsys/debug/coredump_backends/
Dtestcase.yaml16 - "E: #CD:5([aA])45([0-9a-fA-F]+)"

123