i2s_channel_obj_t::pm_lock field
Power management lock, to avoid apb clock frequency changes while i2s is working
![]()
esp_pm_lock_handle_t pm_lock; ![]()
new_chan->pm_lock = NULL; ![]()
if (handle->pm_lock) {![]()
esp_pm_lock_delete(handle->pm_lock);![]()
esp_pm_lock_acquire(handle->pm_lock);![]()
esp_pm_lock_release(handle->pm_lock);![]()
ESP_RETURN_ON_ERROR(esp_pm_lock_create(pm_type, 0, "i2s_driver", &handle->pm_lock), TAG, "I2S pm lock create failed");![]()
ESP_GOTO_ON_ERROR(esp_pm_lock_delete(handle->pm_lock), err, TAG, "I2S delete old pm lock failed");![]()
ESP_GOTO_ON_ERROR(esp_pm_lock_create(pm_type, 0, "i2s_driver", &handle->pm_lock), err, TAG, "I2S pm lock create failed");![]()
ESP_RETURN_ON_ERROR(esp_pm_lock_create(pm_type, 0, "i2s_driver", &handle->pm_lock), TAG, "I2S pm lock create failed");![]()
ESP_GOTO_ON_ERROR(esp_pm_lock_delete(handle->pm_lock), err, TAG, "I2S delete old pm lock failed");![]()
ESP_GOTO_ON_ERROR(esp_pm_lock_create(pm_type, 0, "i2s_driver", &handle->pm_lock), err, TAG, "I2S pm lock create failed");![]()
ESP_RETURN_ON_ERROR(esp_pm_lock_create(pm_type, 0, "i2s_driver", &handle->pm_lock), TAG, "I2S pm lock create failed");![]()
ESP_GOTO_ON_ERROR(esp_pm_lock_delete(handle->pm_lock), err, TAG, "I2S delete old pm lock failed");![]()
ESP_GOTO_ON_ERROR(esp_pm_lock_create(pm_type, 0, "i2s_driver", &handle->pm_lock), err, TAG, "I2S pm lock create failed");
i2s_channel_obj_t::pm_lock is written by 1 function and is read by 6 functions:
![]()
i2s_channel_obj_t::pm_lock