DCP: moved guards so code is not included when building *.c

This commit is contained in:
Daniele Lacamera
2021-05-13 07:29:33 +02:00
parent 6ea5254bb9
commit 563c7391ed

View File

@@ -19,11 +19,15 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
*/ */
#ifdef HAVE_CONFIG_H #ifdef HAVE_CONFIG_H
#include <config.h> #include <config.h>
#endif #endif
#include <wolfssl/wolfcrypt/settings.h> #include <wolfssl/wolfcrypt/settings.h>
#ifdef WOLFSSL_IMXRT_DCP
#ifdef NO_INLINE #ifdef NO_INLINE
#include <wolfssl/wolfcrypt/misc.h> #include <wolfssl/wolfcrypt/misc.h>
#else #else
@@ -38,11 +42,11 @@
#include "fsl_device_registers.h" #include "fsl_device_registers.h"
#include "fsl_debug_console.h" #include "fsl_debug_console.h"
#ifdef WOLFSSL_IMXRT_DCP
#if defined(__DCACHE_PRESENT) && (__DCACHE_PRESENT == 1U) && defined(DCP_USE_DCACHE) && (DCP_USE_DCACHE == 1U) #if defined(__DCACHE_PRESENT) && (__DCACHE_PRESENT == 1U) && defined(DCP_USE_DCACHE) && (DCP_USE_DCACHE == 1U)
#error "DCACHE not supported by this driver. Please undefine DCP_USE_DCACHE." #error "DCACHE not supported by this driver. Please undefine DCP_USE_DCACHE."
#endif #endif
#ifndef DCP_USE_OTP_KEY #ifndef DCP_USE_OTP_KEY
#define DCP_USE_OTP_KEY 0 /* Set to 1 to select OTP key for AES encryption/decryption. */ #define DCP_USE_OTP_KEY 0 /* Set to 1 to select OTP key for AES encryption/decryption. */
#endif #endif
@@ -59,7 +63,6 @@
#include <wolfssl/wolfcrypt/integer.h> #include <wolfssl/wolfcrypt/integer.h>
#endif #endif
#ifndef SINGLE_THREADED #ifndef SINGLE_THREADED
#define dcp_lock_init() wolfSSL_CryptHwMutexInit() #define dcp_lock_init() wolfSSL_CryptHwMutexInit()
#define dcp_lock() wolfSSL_CryptHwMutexLock() #define dcp_lock() wolfSSL_CryptHwMutexLock()