refactor(hal): clean up some hal file dependency on sdkconfig.h

This commit is contained in:
morris
2025-07-16 18:05:06 +08:00
parent 0296c30908
commit ccd092d7dc
35 changed files with 108 additions and 149 deletions

View File

@@ -5,8 +5,7 @@
*/
#include "hal/mpi_hal.h"
#include "hal/mpi_ll.h"
#include "sdkconfig.h"
#include "soc/soc_caps_full.h"
size_t mpi_hal_calc_hardware_words(size_t words)
{
@@ -19,7 +18,7 @@ void mpi_hal_enable_hardware_hw_op(void)
}
// Note: from enabling RSA clock to here takes about 1.3us
#if !CONFIG_IDF_TARGET_ESP32
#if !SOC_IS(ESP32)
mpi_ll_disable_interrupt();
#endif
}
@@ -70,7 +69,7 @@ void mpi_hal_write_rinv(uint32_t rinv)
}
// Acceleration options
#if !CONFIG_IDF_TARGET_ESP32
#if !SOC_IS(ESP32)
void mpi_hal_enable_constant_time(bool enable)
{
if (enable){
@@ -95,7 +94,7 @@ void mpi_hal_set_search_position(size_t position)
{
mpi_ll_set_search_position(position);
}
#endif /* !CONFIG_IDF_TARGET_ESP32 */
#endif // !SOC_IS(ESP32)
/* Begin an RSA operation.
*/