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 #ifndef MFLASH_SECTOR_SIZE
14 #define MFLASH_SECTOR_SIZE (8192U)
15 #endif
16 
17 #ifndef MFLASH_PAGE_SIZE
18 #define MFLASH_PAGE_SIZE (128U)
19 #endif
20 
21 #ifndef MFLASH_PHRASE_SIZE
22 #define MFLASH_PHRASE_SIZE (16U)
23 #endif
24 
25 #ifndef MFLASH_BASE_ADDRESS
26 #define MFLASH_BASE_ADDRESS (0U)
27 #endif
28 
29 #define MFLASH_PAGE_INTEGRITY_CHECKS (1U)
30 
31 #define mflash_drv_is_phrase_aligned(x) (((x) % (MFLASH_PHRASE_SIZE)) == 0U)
32 
33 /*! @brief Writes single phrase */
34 int32_t mflash_drv_phrase_program(uint32_t page_addr, uint32_t *data);
35 
mflash_drv_is_readable(uint32_t addr)36 static inline int32_t mflash_drv_is_readable(uint32_t addr)
37 {
38     return kStatus_Success;
39 }
40 
41 #endif
42