samples: esp32: Switch to FIXED_PARTITION_ macros

The commit switches flash area access from FLASH_AREA_ macros
to FIXED_PARTITION_ macros and to usage of DTS node labels,
to identify partitions, instead of label property.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
This commit is contained in:
Dominik Ermel 2022-07-22 15:07:21 +00:00 committed by Carles Cufí
parent 80e34e2a24
commit 35b82cb6da

View File

@ -24,7 +24,7 @@ void main(void)
{
uint8_t buffer[32];
const struct device *flash_device;
off_t address = FLASH_AREA_OFFSET(storage);
off_t address = FIXED_PARTITION_OFFSET(storage_partition);
flash_device = DEVICE_DT_GET(DT_CHOSEN(zephyr_flash_controller));
if (!device_is_ready(flash_device)) {