diff options
Diffstat (limited to 'lib/chibios-contrib/ext/mcux-sdk/components/flash/mflash/mimxrt1062/mflash_drv.h')
-rw-r--r-- | lib/chibios-contrib/ext/mcux-sdk/components/flash/mflash/mimxrt1062/mflash_drv.h | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/lib/chibios-contrib/ext/mcux-sdk/components/flash/mflash/mimxrt1062/mflash_drv.h b/lib/chibios-contrib/ext/mcux-sdk/components/flash/mflash/mimxrt1062/mflash_drv.h new file mode 100644 index 000000000..8ae4a0118 --- /dev/null +++ b/lib/chibios-contrib/ext/mcux-sdk/components/flash/mflash/mimxrt1062/mflash_drv.h | |||
@@ -0,0 +1,39 @@ | |||
1 | /* | ||
2 | * Copyright 2018-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 (0x1000) | ||
15 | #endif | ||
16 | |||
17 | #ifndef MFLASH_PAGE_SIZE | ||
18 | #define MFLASH_PAGE_SIZE (256) | ||
19 | #endif | ||
20 | |||
21 | #ifndef MFLASH_FLEXSPI | ||
22 | #define MFLASH_FLEXSPI (FLEXSPI) | ||
23 | #endif | ||
24 | |||
25 | #ifndef MFLASH_BASE_ADDRESS | ||
26 | #define MFLASH_BASE_ADDRESS (FlexSPI_AMBA_BASE) | ||
27 | #endif | ||
28 | |||
29 | /* Allow incremental writes without erase (enabled by default). | ||
30 | * This method cannot be used in certain cases, e.g. when page checksums are used | ||
31 | */ | ||
32 | #ifndef MFLASH_INC_WRITE | ||
33 | #define MFLASH_INC_WRITE 1 | ||
34 | #endif | ||
35 | |||
36 | /* API used by OTA applications */ | ||
37 | int32_t mflash_drv_write(uint32_t addr, const uint8_t *data, uint32_t data_len); | ||
38 | |||
39 | #endif | ||