Skip to content

Commit 30cc160

Browse files
ant9000dpgeorge
authored andcommitted
zephyr: Fix macro for getting erase_block_size.
Signed-off-by: Antonio Galea <antonio.galea@gmail.com>
1 parent 104deaa commit 30cc160

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

ports/zephyr/zephyr_storage.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ MP_DEFINE_CONST_OBJ_TYPE(
188188
// Note: Some flash controllers have erase-block-size, others (like QSPI NOR) don't
189189
// For devices without this property, use 4096 as a common default for NOR flash
190190
#define FLASH_AREA_GET_ERASE_SIZE(part) \
191-
DT_PROP_OR(DT_MTD_FROM_FIXED_PARTITION(part), erase_block_size, 4096)
191+
DT_PROP_OR(DT_GPARENT(part), erase_block_size, 4096)
192192

193193
// Create a static tuple for each partition containing (id, erase_block_size)
194194
#define FLASH_AREA_DEFINE_TUPLE(part) \

0 commit comments

Comments
 (0)