mirror of
https://github.com/espressif/esp-idf.git
synced 2026-10-03 03:31:41 +03:00
feat(ds): use RCC atomic block to enable/reset the DS peripheral
This commit is contained in:
@@ -266,7 +266,11 @@ static void ds_acquire_enable(void)
|
||||
}
|
||||
|
||||
periph_module_enable(PERIPH_SHA_MODULE);
|
||||
periph_module_enable(PERIPH_DS_MODULE);
|
||||
|
||||
DS_RCC_ATOMIC() {
|
||||
ds_ll_enable_bus_clock(true);
|
||||
ds_ll_reset_register();
|
||||
}
|
||||
|
||||
hmac_hal_start();
|
||||
}
|
||||
@@ -275,7 +279,10 @@ static void ds_disable_release(void)
|
||||
{
|
||||
ds_hal_finish();
|
||||
|
||||
periph_module_disable(PERIPH_DS_MODULE);
|
||||
DS_RCC_ATOMIC() {
|
||||
ds_ll_enable_bus_clock(false);
|
||||
}
|
||||
|
||||
periph_module_disable(PERIPH_SHA_MODULE);
|
||||
|
||||
HMAC_RCC_ATOMIC() {
|
||||
|
||||
Reference in New Issue
Block a user