Skip to content

Commit 92b8444

Browse files
committed
Merge branch 'feat/support_modify_regdma_link_skip_flag_dynamically' into 'master'
feat(esp_hw_support): add API to supoport modify retention skip flag dynamically See merge request espressif/esp-idf!40596
2 parents 3750278 + 2dc5202 commit 92b8444

File tree

2 files changed

+19
-2
lines changed

2 files changed

+19
-2
lines changed

components/esp_hw_support/include/esp_private/esp_regdma.h

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* SPDX-FileCopyrightText: 2022-2024 Espressif Systems (Shanghai) CO LTD
2+
* SPDX-FileCopyrightText: 2022-2025 Espressif Systems (Shanghai) CO LTD
33
*
44
* SPDX-License-Identifier: Apache-2.0
55
*/
@@ -328,6 +328,14 @@ void regdma_link_stats(void *link, int entry);
328328
*/
329329
void regdma_link_set_write_wait_content(void *link, uint32_t value, uint32_t mask);
330330

331+
/**
332+
* @brief Set the flag for the retention chain node to skip the backup or restore
333+
* @param link REGDMA linked list node pointer
334+
* @param skip_backup whether to skip on active to sleep backup
335+
* @param skip_restore whether to skip on sleep to active backup
336+
*/
337+
void regdma_link_set_skip_flag(void *link, bool skip_backup, bool skip_restore);
338+
331339
/**
332340
* @brief Dump all node information of the REGDMA linked list indicated by the entry argument
333341
* @param link The REGDMA linkded list head pointer

components/esp_hw_support/port/regdma_link.c

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* SPDX-FileCopyrightText: 2022-2024 Espressif Systems (Shanghai) CO LTD
2+
* SPDX-FileCopyrightText: 2022-2025 Espressif Systems (Shanghai) CO LTD
33
*
44
* SPDX-License-Identifier: Apache-2.0
55
*/
@@ -544,6 +544,15 @@ void regdma_link_set_write_wait_content(void *link, uint32_t value, uint32_t mas
544544
}
545545
}
546546

547+
void regdma_link_set_skip_flag(void *link, bool skip_backup, bool skip_restore)
548+
{
549+
if (link) {
550+
regdma_link_head_t *head = &REGDMA_LINK_HEAD(link);
551+
head->skip_b = skip_backup;
552+
head->skip_r = skip_restore;
553+
}
554+
}
555+
547556
static void regdma_link_update_continuous_next_wrapper(void *link, void *next)
548557
{
549558
regdma_link_continuous_t *continuous = __containerof(link, regdma_link_continuous_t, head);

0 commit comments

Comments
 (0)