mirror of
https://github.com/espressif/esp-idf.git
synced 2025-10-07 13:42:43 +00:00
change(esp_hw_support): update some modules sleep retention init dependency bitmap
This commit is contained in:
@@ -867,7 +867,7 @@ esp_err_t spi_bus_initialize(spi_host_device_t host_id, const spi_bus_config_t *
|
||||
.arg = ctx,
|
||||
},
|
||||
},
|
||||
.depends = BIT(SLEEP_RETENTION_MODULE_CLOCK_SYSTEM),
|
||||
.depends = RETENTION_MODULE_BITMAP_INIT(CLOCK_SYSTEM)
|
||||
};
|
||||
|
||||
_lock_acquire(&ctx->mutex);
|
||||
@@ -971,11 +971,11 @@ esp_err_t spi_bus_free(spi_host_device_t host_id)
|
||||
#if SOC_SPI_SUPPORT_SLEEP_RETENTION && CONFIG_PM_POWER_DOWN_PERIPHERAL_IN_LIGHT_SLEEP
|
||||
const periph_retention_module_t retention_id = spi_reg_retention_info[host_id - 1].module_id;
|
||||
_lock_acquire(&ctx->mutex);
|
||||
if (sleep_retention_get_created_modules() & BIT(retention_id)) {
|
||||
assert(sleep_retention_get_inited_modules() & BIT(retention_id));
|
||||
if (sleep_retention_is_module_created(retention_id)) {
|
||||
assert(sleep_retention_is_module_inited(retention_id));
|
||||
sleep_retention_module_free(retention_id);
|
||||
}
|
||||
if (sleep_retention_get_inited_modules() & BIT(retention_id)) {
|
||||
if (sleep_retention_is_module_inited(retention_id)) {
|
||||
sleep_retention_module_deinit(retention_id);
|
||||
}
|
||||
_lock_release(&ctx->mutex);
|
||||
|
Reference in New Issue
Block a user