This is an automated email from the ASF dual-hosted git repository.

jerzy pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-core.git


The following commit(s) were added to refs/heads/master by this push:
     new 01bda44b9 hw/drivers/hash_stm32: Enable for STM32H devices
01bda44b9 is described below

commit 01bda44b9f58d847495025e5160c66c55651dc81
Author: Jerzy Kasenberg <[email protected]>
AuthorDate: Tue Apr 15 11:51:11 2025 +0200

    hw/drivers/hash_stm32: Enable for STM32H devices
    
    Comment explicitly mentioned STM32F415 and STM32F417 devices
    that don't have support for SHA256.
    
    Now condition is reversed so those two are marked as not supported.
    This will enable STM32H7 devices as well as STM32H5.
    
    When device does not have supprt for hash HASH symbol will not
    be defined and build will fail, while right now build for STM32H7 works
    but hash functionality does not work.
    
    Signed-off-by: Jerzy Kasenberg <[email protected]>
---
 hw/drivers/hash/hash_stm32/src/hash_stm32.c | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/hw/drivers/hash/hash_stm32/src/hash_stm32.c 
b/hw/drivers/hash/hash_stm32/src/hash_stm32.c
index cbdceaa2e..68c2b3789 100644
--- a/hw/drivers/hash/hash_stm32/src/hash_stm32.c
+++ b/hw/drivers/hash/hash_stm32/src/hash_stm32.c
@@ -30,13 +30,10 @@ static struct os_mutex gmtx;
  * STM32F415xx and STM32F417xx have a HASH unit that only supports MD5/SHA1
  */
 
-#if defined(STM32F437xx) || defined(STM32F439xx) || defined(STM32F479xx) || \
-    defined(STM32F756xx) || defined(STM32F777xx) || defined(STM32F779xx) || \
-    defined(STM32L4A6xx) || defined(STM32L4S5xx) || defined(STM32L4S7xx) || \
-    defined(STM32L4S9xx)
-static uint32_t g_algos = HASH_ALGO_SHA224 | HASH_ALGO_SHA256;
-#else
+#if defined(STM32F415xx) || defined(STM32F417xx)
 static uint32_t g_algos = 0;
+#else
+static uint32_t g_algos = HASH_ALGO_SHA224 | HASH_ALGO_SHA256;
 #endif
 
 static int

Reply via email to