/**************************************************************************//** * @file MKROMLib.h * @version V2.00 * @brief MaskROM library header file * * @copyright (C) 2019 Nuvoton Technology Corp. All rights reserved. * * Redistribution and use in source and binary forms, with or without modification, * are permitted provided that the following conditions are met: * 1. Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * 3. Neither the name of Nuvoton Technology Corp. nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. *****************************************************************************/ #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) /*!