-
Notifications
You must be signed in to change notification settings - Fork 7.3k
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
event documentation misses semicolon ; after ESP_EVENT_DECLARE_BASE(EVENT_BASE) causing compile error when copy pasting (IDFGH-12098) #13156
Comments
sorry, super simple fix. just add the semicolon to the examples of |
Hi, can you point to which code example has this missing semicolon please? You can just copy-paste it here. Thank you. |
Declaring and Defining Events The event loop library provides macros to declare and define the event base easily. Event base declaration: ESP_EVENT_DECLARE_BASE(EVENT_BASE) ; <---- MISSING semicolon ESP_EVENT_DEFINE_BASE(EVENT_BASE) ; <----- MISSING semicolon thx |
I see now. However I don't think that's a mistake, since #define ESP_EVENT_DECLARE_BASE(id) extern esp_event_base_t const id
#define ESP_EVENT_DEFINE_BASE(id) esp_event_base_t const id = #id You aren't supposed to copy it from docs like ...
ESP_EVENT_DECLARE_BASE(s_your_base_variable);
... But I can see how it can be confusing. |
This commit adds semicolons in c-code blocks in esp_event.rst for improved user experience when directly copying and pasting code. Closes #13156
This commit adds semicolons in c-code blocks in esp_event.rst for improved user experience when directly copying and pasting code. Closes #13156
Answers checklist.
IDF version.
v5.1
Operating System used.
Windows
How did you build your project?
VS Code IDE
If you are using Windows, please specify command line type.
None
What is the expected behavior?
it is just confusing when the documentation misses the semicolon.
What is the actual behavior?
compile error on subsequent statement
Steps to reproduce.
copy paste from documentation of
ESP_EVENT_DECLARE_BASE(EVENT_BASE)
Build or installation Logs.
No response
More Information.
No response
The text was updated successfully, but these errors were encountered: