feat(esp_hw_support): add API to supoport modify retention skip flag dynamically

This commit is contained in:
wuzhenghui
2025-07-15 18:03:40 +08:00
parent c5a7513cb8
commit 2dc52022ac
2 changed files with 19 additions and 2 deletions

View File

@@ -1,5 +1,5 @@
/*
* SPDX-FileCopyrightText: 2022-2024 Espressif Systems (Shanghai) CO LTD
* SPDX-FileCopyrightText: 2022-2025 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
@@ -328,6 +328,14 @@ void regdma_link_stats(void *link, int entry);
*/
void regdma_link_set_write_wait_content(void *link, uint32_t value, uint32_t mask);
/**
* @brief Set the flag for the retention chain node to skip the backup or restore
* @param link REGDMA linked list node pointer
* @param skip_backup whether to skip on active to sleep backup
* @param skip_restore whether to skip on sleep to active backup
*/
void regdma_link_set_skip_flag(void *link, bool skip_backup, bool skip_restore);
/**
* @brief Dump all node information of the REGDMA linked list indicated by the entry argument
* @param link The REGDMA linkded list head pointer

View File

@@ -1,5 +1,5 @@
/*
* SPDX-FileCopyrightText: 2022-2024 Espressif Systems (Shanghai) CO LTD
* SPDX-FileCopyrightText: 2022-2025 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
@@ -544,6 +544,15 @@ void regdma_link_set_write_wait_content(void *link, uint32_t value, uint32_t mas
}
}
void regdma_link_set_skip_flag(void *link, bool skip_backup, bool skip_restore)
{
if (link) {
regdma_link_head_t *head = &REGDMA_LINK_HEAD(link);
head->skip_b = skip_backup;
head->skip_r = skip_restore;
}
}
static void regdma_link_update_continuous_next_wrapper(void *link, void *next)
{
regdma_link_continuous_t *continuous = __containerof(link, regdma_link_continuous_t, head);