2017-12-08 18:50:46 +08:00
|
|
|
/*
|
|
|
|
* Copyright (c) 2017 Nordic Semiconductor ASA
|
|
|
|
* Copyright (c) 2015 Runtime Inc
|
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include <zephyr.h>
|
2019-06-26 00:05:42 +08:00
|
|
|
#include <storage/flash_map.h>
|
2017-12-08 18:50:46 +08:00
|
|
|
|
2018-07-11 09:39:23 +08:00
|
|
|
#define FLASH_AREA_FOO(i, _) \
|
|
|
|
{.fa_id = i, \
|
|
|
|
.fa_off = DT_FLASH_AREA_##i##_OFFSET, \
|
|
|
|
.fa_dev_name = DT_FLASH_AREA_##i##_DEV, \
|
|
|
|
.fa_size = DT_FLASH_AREA_##i##_SIZE,},
|
2018-11-29 14:30:36 +08:00
|
|
|
|
2017-12-08 18:50:46 +08:00
|
|
|
const struct flash_area default_flash_map[] = {
|
2018-07-11 09:39:23 +08:00
|
|
|
UTIL_LISTIFY(DT_FLASH_AREA_NUM, FLASH_AREA_FOO, ~)
|
2017-12-08 18:50:46 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
const int flash_map_entries = ARRAY_SIZE(default_flash_map);
|
|
|
|
const struct flash_area *flash_map = default_flash_map;
|