@@ -56,7 +56,7 @@ parlio_group_t *parlio_acquire_group_handle(int group_id)
5656 .arg = group ,
5757 },
5858 },
59- .depends = SLEEP_RETENTION_MODULE_BM_CLOCK_SYSTEM
59+ .depends = RETENTION_MODULE_BITMAP_INIT ( CLOCK_SYSTEM )
6060 };
6161 // we only do retention init here. Allocate retention module in the unit initialization
6262 if (sleep_retention_module_init (module_id , & init_param ) != ESP_OK ) {
@@ -107,11 +107,11 @@ void parlio_release_group_handle(parlio_group_t *group)
107107 if (do_deinitialize ) {
108108#if PARLIO_USE_RETENTION_LINK
109109 const periph_retention_module_t module_id = parlio_reg_retention_info [group_id ].retention_module ;
110- if (sleep_retention_get_created_modules () & BIT (module_id )) {
111- assert (sleep_retention_get_inited_modules () & BIT (module_id ));
110+ if (sleep_retention_is_module_created (module_id )) {
111+ assert (sleep_retention_is_module_inited (module_id ));
112112 sleep_retention_module_free (module_id );
113113 }
114- if (sleep_retention_get_inited_modules () & BIT (module_id )) {
114+ if (sleep_retention_is_module_inited (module_id )) {
115115 sleep_retention_module_deinit (module_id );
116116 }
117117#endif // PARLIO_USE_RETENTION_LINK
@@ -195,7 +195,7 @@ void parlio_create_retention_module(parlio_group_t *group)
195195 sleep_retention_module_t module_id = parlio_reg_retention_info [group_id ].retention_module ;
196196
197197 _lock_acquire (& s_platform .mutex );
198- if (( sleep_retention_get_inited_modules () & BIT ( module_id )) && !( sleep_retention_get_created_modules () & BIT ( module_id ) )) {
198+ if (sleep_retention_is_module_inited ( module_id ) && !sleep_retention_is_module_created ( module_id )) {
199199 if (sleep_retention_module_allocate (module_id ) != ESP_OK ) {
200200 // even though the sleep retention module create failed, PARLIO driver should still work, so just warning here
201201 ESP_LOGW (TAG , "create retention module failed, power domain can't turn off" );
0 commit comments