/**************************************************************************//** * @file MKROMLib.h * @version V2.00 * @brief MaskROM library header file * * @copyright SPDX-License-Identifier: Apache-2.0 * @copyright Copyright (C) 2018-2020 Nuvoton Technology Corp. All rights reserved. *****************************************************************************/ #ifndef __MKROM_LIB_H__ #define __MKROM_LIB_H__ #ifdef __cplusplus extern "C" { #endif /** @addtogroup Standard_Driver Standard Driver @{ */ /** @addtogroup MKROM_Driver MKROM Driver @{ */ /** @addtogroup MKROM_EXPORTED_CONSTANTS MKROM Exported Constants @{ */ /*--------------------------------------------------------------------------------------------------*/ /* Status and Error Code Constant Definitions */ /*--------------------------------------------------------------------------------------------------*/ #define BL_ERR_TT_CHECK 0xF0F00000UL /*!< Not a Non-secure parameter */ #define BL_ERR_PARAMETER 0xF0F00001UL /*!< Invalid parameter */ #define BL_PARAM_ALIGN 0xF0F00002UL /*!< Parameter alignment error */ #define BL_NOT_FLASH_ADDR 0xF0F00003UL /*!< Invalid flash address */ #define BL_NOT_SRAM_ADDR 0xF0F00004UL /*!< Invalid sram address */ #define BL_XOM_NOT_CONFIG 0xF0F00005UL /*!< XOM is not configure yet */ #define BL_XOM_HAS_CONFIG 0xF0F00006UL /*!< XOM has beeen configured */ #define BL_XOM_HAS_ACTIVE 0xF0F00007UL /*!< XOM is actived */ #define BL_XOM_BASE_ERROR 0xF0F00008UL /*!< Invalid XOM base address */ #define BL_KPROM_NOT_ENABLE 0xF0F00009UL /*!< KPROM is not enabled yet */ #define BL_KPROM_KEY_FORBID 0xF0F0000AUL /*!< KPROM comparison is forbidden */ #define BL_KPROM_KEY_UNMATCH 0xF0F0000BUL /*!< KPROM comparison is unmatched */ #define BL_KPROM_KEY_LOCKED 0xF0F0000CUL /*!< KPROM write-protect is enabled */ #define BL_KPROM_SET_FAIL 0xF0F0000EUL /*!< Set KPROM key fail */ #define BL_ISP_CMD_FAIL (-1) /*!< FMC command fail */ #define BL_FLASH_ALLONE 0xA11FFFFFUL /*!< Check-all-one result is all one */ #define BL_FLASH_NOT_ALLONE 0xA1100000UL /*!< Check-all-one result is not all one*/ /*--------------------------------------------------------------------------------------------------*/ /* Random Number Generator Constant Definitions */ /*--------------------------------------------------------------------------------------------------*/ #define BL_RNG_PRNG (0UL) /*!