1459 views|3 replies

6062

Posts

4

Resources
The OP
 

【Home Treasure】 esp32s2 wifi sta analysis [Copy link]

 This post was last edited by damiaa on 2022-9-5 10:22

【Home Treasure】 esp32s2 wifi sta analysis

例子:Wifi station_example Station_examole_main.c

Used wifi initialization

freertos

Event Loop Library库

For more information about freertos_xEventCroup_api, please refer to the esp32 programming guide.

The freertos_xEventCroup_api message events and message responses are responded to in the foreground and background respectively, as shown in the following figure:

For xEventGroup, please refer to the following figure:

How to create:

How to use:

How to clear:

How to set up:

The workflow of the Event Loop Library is as follows:

1. esp_event_loop_create_default() in wifi_init_sta() creates an event loop.

2. Register two events that the user wants to respond to so that they can be responded to in the event response function.

esp_event_handler_instance_tinstance_any_id;

esp_event_handler_instance_tinstance_got_ip;

ESP_ERROR_CHECK(esp_event_handler_instance_register(WIFI_EVENT,

ESP_EVENT_ANY_ID,

&event_handler,

NULL,

&instance_any_id));

ESP_ERROR_CHECK(esp_event_handler_instance_register(IP_EVENT,

IP_EVENT_STA_GOT_IP,

&event_handler,

NULL,

&instance_got_ip));

3,staticvoidevent_handler(void* arg, esp_event_base_tevent_base,int32_tevent_id, void* event_data)中响应

4. The triggering condition is: ESP_ERROR_CHECK(esp_wifi_start());

5. Default Event Loop allows wifi events to work properly.

Thanks for watching. See you next time.

This post is from DigiKey Technology Zone

Latest reply

Professional! This is the boss   Details Published on 2022-9-5 21:58
 
 

6818

Posts

11

Resources
2
 

The explanation is very detailed, I have learned a lot, thanks for sharing the knowledge about wifi sta!

This post is from DigiKey Technology Zone

Comments

Thanks!  Details Published on 2022-9-5 10:16
 
 
 

6062

Posts

4

Resources
3
 
lugl4313820 posted on 2022-9-5 09:54 The explanation is very detailed, I have learned a lot, thank you for sharing the knowledge about wifi sta!

Thanks!

This post is from DigiKey Technology Zone
 
 
 

91

Posts

0

Resources
4
 

Professional! This is the boss

This post is from DigiKey Technology Zone
 
 
 

Just looking around
Find a datasheet?

EEWorld Datasheet Technical Support

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews

Room 1530, Zhongguancun MOOC Times Building, Block B, 18 Zhongguancun Street, Haidian District, Beijing 100190, China Tel:(010)82350740 Postcode:100190

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京B2-20211791 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号
快速回复 返回顶部 Return list