1 /* 2 * Copyright 2017-2020 NXP 3 * 4 * SPDX-License-Identifier: BSD-3-Clause 5 */ 6 7 #ifndef __MFLASH_DRV_H__ 8 #define __MFLASH_DRV_H__ 9 10 #include "mflash_common.h" 11 12 /* Flash constants */ 13 14 /* 15 * The value is not sector size as reported by FLASH_GetProperty() in mflash_drv_init(). 16 * this platform can erase/program the flash memory by smaller block (actually page size). 17 */ 18 #ifndef MFLASH_SECTOR_SIZE 19 #define MFLASH_SECTOR_SIZE (512) 20 #endif 21 22 #ifndef MFLASH_PAGE_SIZE 23 #define MFLASH_PAGE_SIZE (512) 24 #endif 25 26 #ifndef MFLASH_BASE_ADDRESS 27 #define MFLASH_BASE_ADDRESS (0) 28 #endif 29 30 #define MFLASH_PAGE_INTEGRITY_CHECKS (1) 31 32 int32_t mflash_drv_is_readable(uint32_t addr); 33 34 #endif 35