11/*
2- * SPDX-FileCopyrightText: 2023-2024 Espressif Systems (Shanghai) CO LTD
2+ * SPDX-FileCopyrightText: 2023-2025 Espressif Systems (Shanghai) CO LTD
33 *
44 * SPDX-License-Identifier: Apache-2.0
55 */
99#include <string.h>
1010#include "hal/assert.h"
1111#include "soc/ecdsa_reg.h"
12+ #include "soc/ecdsa_struct.h"
1213#include "soc/pcr_struct.h"
1314#include "hal/ecdsa_types.h"
15+ #include "hal/ecc_ll.h"
1416
1517#ifdef __cplusplus
1618extern "C" {
@@ -31,7 +33,7 @@ typedef enum {
3133 * @brief Interrupt types in ECDSA
3234 */
3335typedef enum {
34- ECDSA_INT_CALC_DONE ,
36+ ECDSA_INT_PREP_DONE ,
3537 ECDSA_INT_SHA_RELEASE ,
3638} ecdsa_ll_intr_type_t ;
3739
@@ -97,8 +99,8 @@ static inline void ecdsa_ll_reset_register(void)
9799static inline void ecdsa_ll_enable_intr (ecdsa_ll_intr_type_t type )
98100{
99101 switch (type ) {
100- case ECDSA_INT_CALC_DONE :
101- REG_SET_FIELD (ECDSA_INT_ENA_REG , ECDSA_CALC_DONE_INT_ENA , 1 );
102+ case ECDSA_INT_PREP_DONE :
103+ REG_SET_FIELD (ECDSA_INT_ENA_REG , ECDSA_PREP_DONE_INT_ENA , 1 );
102104 break ;
103105 case ECDSA_INT_SHA_RELEASE :
104106 REG_SET_FIELD (ECDSA_INT_ENA_REG , ECDSA_SHA_RELEASE_INT_ENA , 1 );
@@ -117,8 +119,8 @@ static inline void ecdsa_ll_enable_intr(ecdsa_ll_intr_type_t type)
117119static inline void ecdsa_ll_disable_intr (ecdsa_ll_intr_type_t type )
118120{
119121 switch (type ) {
120- case ECDSA_INT_CALC_DONE :
121- REG_SET_FIELD (ECDSA_INT_ENA_REG , ECDSA_CALC_DONE_INT_ENA , 0 );
122+ case ECDSA_INT_PREP_DONE :
123+ REG_SET_FIELD (ECDSA_INT_ENA_REG , ECDSA_PREP_DONE_INT_ENA , 0 );
122124 break ;
123125 case ECDSA_INT_SHA_RELEASE :
124126 REG_SET_FIELD (ECDSA_INT_ENA_REG , ECDSA_SHA_RELEASE_INT_ENA , 0 );
@@ -137,8 +139,8 @@ static inline void ecdsa_ll_disable_intr(ecdsa_ll_intr_type_t type)
137139static inline void ecdsa_ll_clear_intr (ecdsa_ll_intr_type_t type )
138140{
139141 switch (type ) {
140- case ECDSA_INT_CALC_DONE :
141- REG_SET_FIELD (ECDSA_INT_CLR_REG , ECDSA_CALC_DONE_INT_CLR , 1 );
142+ case ECDSA_INT_PREP_DONE :
143+ REG_SET_FIELD (ECDSA_INT_CLR_REG , ECDSA_PREP_DONE_INT_CLR , 1 );
142144 break ;
143145 case ECDSA_INT_SHA_RELEASE :
144146 REG_SET_FIELD (ECDSA_INT_CLR_REG , ECDSA_SHA_RELEASE_INT_CLR , 1 );
0 commit comments