mirror of
https://github.com/espressif/esp-idf.git
synced 2026-10-01 18:50:34 +03:00
feat: enable HMAC peripheral support for ESP32-H4
This commit is contained in:
@@ -16,9 +16,9 @@
|
||||
#include "esp_crypto_periph_clk.h"
|
||||
#include "soc/hwcrypto_reg.h"
|
||||
#include "soc/system_reg.h"
|
||||
#include "soc/soc_caps.h"
|
||||
|
||||
#if !CONFIG_IDF_TARGET_ESP32S2
|
||||
#include "hal/ds_ll.h"
|
||||
#include "hal/hmac_hal.h"
|
||||
#include "hal/hmac_ll.h"
|
||||
#include "hal/sha_ll.h"
|
||||
@@ -75,7 +75,9 @@ esp_err_t esp_hmac_calculate(hmac_key_id_t key_id,
|
||||
|
||||
esp_crypto_sha_enable_periph_clk(true);
|
||||
|
||||
#if SOC_DIG_SIGN_SUPPORTED
|
||||
esp_crypto_ds_enable_periph_clk(true);
|
||||
#endif
|
||||
|
||||
#if SOC_KEY_MANAGER_HMAC_KEY_DEPLOY
|
||||
/* Key Manager holds the key usage selector register(efuse vs own key).
|
||||
@@ -149,7 +151,9 @@ esp_err_t esp_hmac_calculate(hmac_key_id_t key_id,
|
||||
esp_crypto_key_mgr_enable_periph_clk(false);
|
||||
#endif /* SOC_KEY_MANAGER_HMAC_KEY_DEPLOY */
|
||||
|
||||
#if SOC_DIG_SIGN_SUPPORTED
|
||||
esp_crypto_ds_enable_periph_clk(false);
|
||||
#endif
|
||||
|
||||
esp_crypto_sha_enable_periph_clk(false);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user