esp-idf/examples/cxx/experimental/esp_event_cxx/README.md
Jakob Hasse f835bead45 C++: ESP Event wrapper classes
* Provide easy interface to esp_event in C++
* Extended functionality linke synchronous
  waiting for events

* Closes IDF-1048
* Closes IDF-232
2020-10-22 09:56:52 +08:00

1.1 KiB

ESP Event synchronous example

(See the README.md file in the upper level 'examples' directory for more information about examples.)

How to use example

Configure the project

idf.py menuconfig
  • Set serial port under Serial Flasher Options.

Build and Flash

Build the project and flash it to the board, then run monitor tool to view serial output:

idf.py -p PORT flash monitor

(To exit the serial monitor, type Ctrl-].)

See the Getting Started Guide for full steps to configure and use ESP-IDF to build projects.

Example Output

I (409) ESP Event C++: started event loop
event base test, ID: 0; called first round
event base test, ID: 1; called first round
received timeout
event base test, ID: 0; called second round
event base test, ID: 1; called second round
event base test, ID: 0; called second round
event base test, ID: 1; called second round
event base test, ID: 0; called second round
event base test, ID: 1; called second round
event base test, ID: 0; called second round
event base test, ID: 1; called second round
I (10419) ESP Event C++: Missed: 0 events