(cherry picked from commit 797a0c4e6eafaf6164e0f9c34f3867a46733924c) Co-authored-by: Zhou Xiao <zhouxiao@espressif.com>