Skip to content
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

When I Learning your project, I have some questions #1

Closed
WangShuoran opened this issue Mar 31, 2022 · 2 comments
Closed

When I Learning your project, I have some questions #1

WangShuoran opened this issue Mar 31, 2022 · 2 comments

Comments

@WangShuoran
Copy link

In your main/src/core/os.c, I find some code:

    ESP_ERROR_CHECK(esp_event_loop_create_default());

    ESP_ERROR_CHECK(esp_event_handler_register(WIFI_EVENT, ESP_EVENT_ANY_ID, &wifi_event_handler, NULL));
    ESP_ERROR_CHECK(esp_event_handler_register(IP_EVENT, ESP_EVENT_ANY_ID, &ip_event_handler, NULL));
    ESP_ERROR_CHECK(esp_event_handler_register(SC_EVENT, ESP_EVENT_ANY_ID, &sc_event_handler, NULL));

Those mean create a default event loop, and put any event to this loop.

I want to know WIFI_EVENT, IP_EVENT, SC_EVENT mean what, I can't check with IDE "Go to definition" or "Go to declaration"

I google of this, I see in this website he also set same name to this position.

I want to know want it is?

The manual is this:

image

image

when I try to go to definition:
image

And when I learn freertos, in xTaskCreate also set pcName as string. Does those is one type thing?
image

Thank you!

@WangShuoran
Copy link
Author

I understand, Thank you for confirmation.

the pass code is setting the esp_event_handler_instance_register needed first parameter:

ESP_EVENT_DECLARE_BASE(WIFI_EVENT);
......
esp_event_handler_instance_register(WIFI_EVENT, ...);

Thank you again!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants