123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113 |
- #ifndef _FSL_FTFX_FEATURES_H_
- #define _FSL_FTFX_FEATURES_H_
- #if (defined(BL_TARGET_FLASH) || defined(BL_TARGET_ROM) || defined(BL_TARGET_RAM))
- #include <assert.h>
- #include <string.h>
- #include "fsl_device_registers.h"
- #include "bootloader_common.h"
- #else
- #include "fsl_common.h"
- #endif
- #include "fsl_ftfx_adapter.h"
- #if !defined(FTFx_DRIVER_IS_FLASH_RESIDENT)
- #if (!defined(BL_TARGET_ROM) && !defined(BL_TARGET_RAM))
- #define FTFx_DRIVER_IS_FLASH_RESIDENT 1
- #else
- #define FTFx_DRIVER_IS_FLASH_RESIDENT 0
- #endif
- #endif
- #if !defined(FTFx_DRIVER_IS_EXPORTED)
- #if defined(BL_TARGET_ROM)
- #define FTFx_DRIVER_IS_EXPORTED 1
- #else
- #define FTFx_DRIVER_IS_EXPORTED 0
- #endif
- #endif
- #if defined(FSL_FEATURE_FLASH_HAS_MULTIPLE_FLASH) || defined(FSL_FEATURE_FLASH_PFLASH_1_START_ADDRESS)
- #define FTFx_DRIVER_HAS_FLASH1_SUPPORT (1)
- #define FTFx_FLASH_COUNT (2)
- #else
- #define FTFx_DRIVER_HAS_FLASH1_SUPPORT (0)
- #define FTFx_FLASH_COUNT (1)
- #endif
- #if defined(FSL_FEATURE_FLASH_HAS_MULTIPLE_FLASH) && defined(FTFE_FPROTS_PROTS_MASK)
- #define FTFx_FLASH1_HAS_PROT_CONTROL (1)
- #else
- #define FTFx_FLASH1_HAS_PROT_CONTROL (0)
- #endif
- #if defined(FSL_FEATURE_FLASH_HAS_MULTIPLE_FLASH) && defined(FTFE_FACSSS_SGSIZE_S_MASK)
- #define FTFx_FLASH1_HAS_XACC_CONTROL (1)
- #else
- #define FTFx_FLASH1_HAS_XACC_CONTROL (0)
- #endif
- #if FTFx_FLASH1_HAS_XACC_CONTROL || FTFx_FLASH1_HAS_PROT_CONTROL
- #define FTFx_FLASH1_IS_INDEPENDENT_BLOCK (1)
- #else
- #define FTFx_FLASH1_IS_INDEPENDENT_BLOCK (0)
- #endif
- #endif
|