mirror of
https://github.com/espressif/esp-idf.git
synced 2025-09-01 06:27:29 +00:00
feat(ecdsa): use RCC atomic block to enable/reset the ECDSA peripheral
This commit is contained in:
@@ -9,6 +9,7 @@
|
||||
#include <string.h>
|
||||
#include "hal/assert.h"
|
||||
#include "soc/ecdsa_reg.h"
|
||||
#include "soc/pcr_struct.h"
|
||||
#include "hal/ecdsa_types.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
@@ -70,6 +71,25 @@ typedef enum {
|
||||
ECDSA_MODE_SHA_CONTINUE
|
||||
} ecdsa_ll_sha_mode_t;
|
||||
|
||||
/**
|
||||
* @brief Enable the bus clock for ECDSA peripheral module
|
||||
*
|
||||
* @param true to enable the module, false to disable the module
|
||||
*/
|
||||
static inline void ecdsa_ll_enable_bus_clock(bool enable)
|
||||
{
|
||||
PCR.ecdsa_conf.ecdsa_clk_en = enable;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Reset the ECDSA peripheral module
|
||||
*/
|
||||
static inline void ecdsa_ll_reset_register(void)
|
||||
{
|
||||
PCR.ecdsa_conf.ecdsa_rst_en = 1;
|
||||
PCR.ecdsa_conf.ecdsa_rst_en = 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Enable interrupt of a given type
|
||||
*
|
||||
|
Reference in New Issue
Block a user