docs: add application example for esp-now

This commit is contained in:
intern 2022-01-04 16:13:54 +08:00
parent fa8364a544
commit b0a2dda075
2 changed files with 14 additions and 0 deletions

View File

@ -81,6 +81,13 @@ Receiving ESP-NOW Data
Call ``esp_now_register_recv_cb`` to register receiving callback function. Call the receiving callback function when receiving ESP-NOW. The receiving callback function also runs from the Wi-Fi task. So, do not do lengthy operations in the callback function.
Instead, post the necessary data to a queue and handle it from a lower priority task.
Application Examples
--------------------
* Example of sending and receiving ESP-NOW data between two devices: :example:`wifi/espnow`.
* For more application examples of how to use ESP-NOW, please visit `ESP-NOW <https://github.com/espressif/esp-now>`_ repository.
API Reference
-------------

View File

@ -81,6 +81,13 @@ ESP-NOW 采用 CCMP 方法保护供应商特定动作帧的安全,具体可参
调用 ``esp_now_register_recv_cb`` 注册接收回调函数。当接收 ESP-NOW 数据时,需要调用接收回调函数。接收回调函数也在 Wi-Fi 任务任务中运行。因此,不要在回调函数中执行冗长的操作。
相反,将必要的数据发布到队列,并交给优先级较低的任务处理。
应用示例
----------
* 如何在设备间传输 ESP-NOW 数据::example:`wifi/espnow`
* 了解更多 ESP-NOW 的应用示例,请参考 `README.md 文件 <https://github.com/espressif/esp-now>`_
API 参考
-------------