mirror of
https://github.com/espressif/esp-idf.git
synced 2026-05-28 16:46:31 +03:00
fix(bitscrambler): fixed extra_clean_up actions done after clock disable
Cannot write to any bitscrambler registers after clock is disabled in release_channel(). (cherry picked from commit 39a131617d82e3641d8f0b03b4ec5e5ef1051fd6)
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2024-2025 Espressif Systems (Shanghai) CO LTD
|
||||
* SPDX-FileCopyrightText: 2024-2026 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
@@ -301,15 +301,18 @@ void bitscrambler_free(bitscrambler_handle_t handle)
|
||||
if (!handle) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (handle->extra_clean_up) {
|
||||
handle->extra_clean_up(handle, handle->clean_up_user_ctx);
|
||||
}
|
||||
|
||||
if (handle->loopback) {
|
||||
release_channel(BITSCRAMBLER_DIR_TX);
|
||||
release_channel(BITSCRAMBLER_DIR_RX);
|
||||
} else {
|
||||
release_channel(handle->cfg.dir);
|
||||
}
|
||||
if (handle->extra_clean_up) {
|
||||
handle->extra_clean_up(handle, handle->clean_up_user_ctx);
|
||||
}
|
||||
|
||||
free(handle);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user