83 lines
1.9 KiB
C
83 lines
1.9 KiB
C
#ifndef __INCLUDES_H__
|
|
#define __INCLUDES_H__
|
|
|
|
/* 配置文件 */
|
|
#include "app_config.h"
|
|
|
|
/* 用户库 */
|
|
#include "main.h"
|
|
|
|
/* 工具库 */
|
|
#include <string.h>
|
|
#include <stdio.h>
|
|
#include <stdlib.h>
|
|
#include <stdarg.h>
|
|
|
|
/* Component */
|
|
#if (CONFIG_DECRYPT)
|
|
#include "aes.h"
|
|
#endif
|
|
|
|
|
|
//! \note for IAR
|
|
#ifdef __IS_COMPILER_IAR__
|
|
# undef __IS_COMPILER_IAR__
|
|
#endif
|
|
#if defined(__IAR_SYSTEMS_ICC__)
|
|
# define __IS_COMPILER_IAR__ 1
|
|
#endif
|
|
|
|
//! \note for arm compiler 5
|
|
#ifdef __IS_COMPILER_ARM_COMPILER_5__
|
|
# undef __IS_COMPILER_ARM_COMPILER_5__
|
|
#endif
|
|
#if ((__ARMCC_VERSION >= 5000000) && (__ARMCC_VERSION < 6000000))
|
|
# define __IS_COMPILER_ARM_COMPILER_5__ 1
|
|
#endif
|
|
//! @}
|
|
|
|
//! \note for arm compiler 6
|
|
#ifdef __IS_COMPILER_ARM_COMPILER_6__
|
|
# undef __IS_COMPILER_ARM_COMPILER_6__
|
|
#endif
|
|
#if ((__ARMCC_VERSION >= 6000000) && (__ARMCC_VERSION < 7000000))
|
|
# define __IS_COMPILER_ARM_COMPILER_6__ 1
|
|
#endif
|
|
|
|
#ifdef __IS_COMPILER_ARM_COMPILER__
|
|
# undef __IS_COMPILER_ARM_COMPILER__
|
|
#endif
|
|
#if defined(__IS_COMPILER_ARM_COMPILER_5__) && __IS_COMPILER_ARM_COMPILER_5__ \
|
|
|| defined(__IS_COMPILER_ARM_COMPILER_6__) && __IS_COMPILER_ARM_COMPILER_6__
|
|
# define __IS_COMPILER_ARM_COMPILER__ 1
|
|
#endif
|
|
|
|
#ifdef __IS_COMPILER_LLVM__
|
|
# undef __IS_COMPILER_LLVM__
|
|
#endif
|
|
#if defined(__clang__) && !__IS_COMPILER_ARM_COMPILER_6__
|
|
# define __IS_COMPILER_LLVM__ 1
|
|
#else
|
|
//! \note for gcc
|
|
#ifdef __IS_COMPILER_GCC__
|
|
# undef __IS_COMPILER_GCC__
|
|
#endif
|
|
#if defined(__GNUC__) && !(__IS_COMPILER_ARM_COMPILER_6__ || __IS_COMPILER_LLVM__)
|
|
# define __IS_COMPILER_GCC__ 1
|
|
#endif
|
|
//! @}
|
|
#endif
|
|
//! @}
|
|
|
|
|
|
#if (ENABLE_ASSERT)
|
|
extern void Assert_Failed(uint8_t *func, uint32_t line);
|
|
#define ASSERT(expr) ((expr) ? (void)0U : Assert_Failed((uint8_t *)__func__, __LINE__))
|
|
#else
|
|
#define ASSERT(expr) ((void)0U)
|
|
#endif
|
|
|
|
|
|
|
|
#endif
|