-
-
Notifications
You must be signed in to change notification settings - Fork 224
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SPI initialization error on ESP-IDF v5.4 (prerelease) #661
Comments
A more future-proof fix would be to change the
to:
That way, any future field that gets added to ESP-IDF will be initialized to 0, which is likely what IDF expects for backwards-compatibility. |
Ah right, I missed the |
The reason is simple: we want to set unused pin settings to -1 (not used). |
The code should memset to 0 and then explicitly initialize any field that needs to be non-zero; this is standard practice. It's a pity the SDK doesn't provide a macro to initialize all the fields to default values, and that GPIO 0 is a valid value... |
Note that not every single pin field needs to be set to
|
Environment ( 実行環境 )
Problem Description ( 問題の内容 )
With latest ESP-IDF v5.4 (works fine on v5.3 though), I was getting these errors:
It seems like
buscfg.data_io_default_level = 0;
is needed insrc/lgfx/v1/platforms/esp32/common.cpp
on line 519 (though I am not sure why since it's all getting memset to zero anyway):The text was updated successfully, but these errors were encountered: