From b23efdc7b374e48646053d914f3d26540af93caf Mon Sep 17 00:00:00 2001 From: isiora Date: Tue, 14 Nov 2017 15:38:08 +0000 Subject: [PATCH] Wrapped with the halconf USE macro. git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@11000 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- os/hal/ports/SAMA/LLD/CRYPTOv1/sama_aes_lld.c | 6 ++++++ os/hal/ports/SAMA/LLD/CRYPTOv1/sama_crypto_lld.c | 7 +++++++ os/hal/ports/SAMA/LLD/CRYPTOv1/sama_crypto_lld.h | 5 +++++ os/hal/ports/SAMA/LLD/CRYPTOv1/sama_tdes_lld.c | 7 +++++++ 4 files changed, 25 insertions(+) diff --git a/os/hal/ports/SAMA/LLD/CRYPTOv1/sama_aes_lld.c b/os/hal/ports/SAMA/LLD/CRYPTOv1/sama_aes_lld.c index f8d9124db..0efed73b0 100644 --- a/os/hal/ports/SAMA/LLD/CRYPTOv1/sama_aes_lld.c +++ b/os/hal/ports/SAMA/LLD/CRYPTOv1/sama_aes_lld.c @@ -14,6 +14,9 @@ limitations under the License. */ #include "hal.h" + +#if (HAL_USE_CRY == TRUE) || defined(__DOXYGEN__) + #include "sama_crypto_lld.h" void sama_aes_lld_write_key(const uint32_t * key, const uint32_t * vectors, @@ -251,3 +254,6 @@ cryerror_t sama_aes_lld_process_dma(CRYDriver *cryp, aesparams *params, } +#endif /* HAL_USE_CRY */ + +/** @} */ diff --git a/os/hal/ports/SAMA/LLD/CRYPTOv1/sama_crypto_lld.c b/os/hal/ports/SAMA/LLD/CRYPTOv1/sama_crypto_lld.c index 8375dab67..6f9653779 100644 --- a/os/hal/ports/SAMA/LLD/CRYPTOv1/sama_crypto_lld.c +++ b/os/hal/ports/SAMA/LLD/CRYPTOv1/sama_crypto_lld.c @@ -14,6 +14,9 @@ limitations under the License. */ #include "hal.h" + +#if HAL_USE_CRY || defined(__DOXYGEN__) + #include "sama_crypto_lld.h" #define KEY0_BUFFER_SIZE_W HAL_CRY_MAX_KEY_SIZE/4 @@ -191,3 +194,7 @@ static void crypto_lld_serve_write_interrupt(CRYDriver *cryp, uint32_t flags) { } #endif + +#endif /* HAL_USE_CRY */ + +/** @} */ diff --git a/os/hal/ports/SAMA/LLD/CRYPTOv1/sama_crypto_lld.h b/os/hal/ports/SAMA/LLD/CRYPTOv1/sama_crypto_lld.h index 734fad25b..5636d32b3 100644 --- a/os/hal/ports/SAMA/LLD/CRYPTOv1/sama_crypto_lld.h +++ b/os/hal/ports/SAMA/LLD/CRYPTOv1/sama_crypto_lld.h @@ -16,6 +16,8 @@ #ifndef SAMA_CRYPTO_LLD_H_ #define SAMA_CRYPTO_LLD_H_ +#if HAL_USE_CRY || defined(__DOXYGEN__) + extern void samaCryptoDriverInit(CRYDriver *cryp); extern void samaCryptoDriverStart(CRYDriver *cryp); extern void samaCryptoDriverStop(CRYDriver *cryp); @@ -50,5 +52,8 @@ extern uint32_t key0_buffer[HAL_CRY_MAX_KEY_SIZE/4]; #include "sama_aes_lld.h" #include "sama_tdes_lld.h" +#endif /* HAL_USE_CRY */ #endif //SAMA_CRYPTO_LLD_H_ + +/** @} */ diff --git a/os/hal/ports/SAMA/LLD/CRYPTOv1/sama_tdes_lld.c b/os/hal/ports/SAMA/LLD/CRYPTOv1/sama_tdes_lld.c index c6de6fca7..f72cb2324 100644 --- a/os/hal/ports/SAMA/LLD/CRYPTOv1/sama_tdes_lld.c +++ b/os/hal/ports/SAMA/LLD/CRYPTOv1/sama_tdes_lld.c @@ -14,6 +14,9 @@ limitations under the License. */ #include "hal.h" + +#if (HAL_USE_CRY == TRUE) || defined(__DOXYGEN__) + #include "sama_crypto_lld.h" #include "sama_tdes_lld.h" @@ -255,3 +258,7 @@ cryerror_t sama_tdes_lld_dma(CRYDriver *cryp, tdes_config_t *params, return CRY_NOERROR; } +#endif /* HAL_USE_CRY */ + +/** @} */ +