feat(ppa): add sleep retention support for DMA2D and PPA

This commit is contained in:
Song Ruo Jing
2026-06-15 15:45:07 +08:00
parent 67fdf46105
commit 14d8570163
26 changed files with 690 additions and 155 deletions
@@ -57,7 +57,7 @@ typedef enum {
*
* @param enable Set true to enable, false to disable
*/
static inline void ppa_ll_enable_bus_clock(bool enable)
static inline void _ppa_ll_enable_bus_clock(bool enable)
{
HP_SYS_CLKRST.soc_clk_ctrl1.reg_ppa_sys_clk_en = enable;
}
@@ -66,13 +66,13 @@ static inline void ppa_ll_enable_bus_clock(bool enable)
/// the critical section needs to declare the __DECLARE_RCC_ATOMIC_ENV variable in advance
#define ppa_ll_enable_bus_clock(...) do { \
(void)__DECLARE_RCC_ATOMIC_ENV; \
ppa_ll_enable_bus_clock(__VA_ARGS__); \
_ppa_ll_enable_bus_clock(__VA_ARGS__); \
} while(0)
/**
* @brief Reset the PPA module
*/
static inline void ppa_ll_reset_register(void)
static inline void _ppa_ll_reset_register(void)
{
HP_SYS_CLKRST.hp_rst_en1.reg_rst_en_ppa = 1;
HP_SYS_CLKRST.hp_rst_en1.reg_rst_en_ppa = 0;
@@ -82,7 +82,7 @@ static inline void ppa_ll_reset_register(void)
/// the critical section needs to declare the __DECLARE_RCC_ATOMIC_ENV variable in advance
#define ppa_ll_reset_register(...) do { \
(void)__DECLARE_RCC_ATOMIC_ENV; \
ppa_ll_reset_register(__VA_ARGS__); \
_ppa_ll_reset_register(__VA_ARGS__); \
} while(0)
/**