aboutsummaryrefslogtreecommitdiffstats
path: root/os/hal/ports/STM32/LLD/CRYPv1/hal_crypto_lld.h
diff options
context:
space:
mode:
Diffstat (limited to 'os/hal/ports/STM32/LLD/CRYPv1/hal_crypto_lld.h')
-rw-r--r--os/hal/ports/STM32/LLD/CRYPv1/hal_crypto_lld.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/os/hal/ports/STM32/LLD/CRYPv1/hal_crypto_lld.h b/os/hal/ports/STM32/LLD/CRYPv1/hal_crypto_lld.h
index 509206e76..bde137f73 100644
--- a/os/hal/ports/STM32/LLD/CRYPv1/hal_crypto_lld.h
+++ b/os/hal/ports/STM32/LLD/CRYPv1/hal_crypto_lld.h
@@ -80,7 +80,8 @@
/**
* @brief Minimum message size (in words) for DMA use.
- * @note If set to zero then DMA is always used.
+ * @note If set to zero then DMA is never used.
+ * @note If set to one then DMA is always used.
*/
#if !defined(STM32_CRY_HASH_SIZE_THRESHOLD) || defined(__DOXYGEN__)
#define STM32_CRY_HASH_SIZE_THRESHOLD 1024
@@ -173,6 +174,10 @@
#define STM32_DMA_REQUIRED
#endif
+#if STM32_CRY_HASH_SIZE_THRESHOLD < 0
+#error "invalid STM32_CRY_HASH_SIZE_THRESHOLD value"
+#endif
+
/**
* @name Driver capability switches
* @{
@@ -254,6 +259,7 @@ struct CRYDriver {
#if STM32_CRY_USE_CRYP1 || defined (__DOXYGEN__)
#endif
#if STM32_CRY_USE_HASH1 || defined (__DOXYGEN__)
+#if (STM32_CRY_HASH_SIZE_THRESHOLD != 0) || defined (__DOXYGEN__)
/**
* @brief Thread reference for hash operations.
*/
@@ -263,6 +269,7 @@ struct CRYDriver {
*/
const stm32_dma_stream_t *dma_hash;
#endif
+#endif
};
#if (CRY_LLD_SUPPORTS_SHA1 == TRUE) || defined(__DOXYGEN__)