EasyManua.ls Logo

Espressif ESP32-S2 - Page 143

Espressif ESP32-S2
1695 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Chapter 2. API Reference
ESP_ERR_ESPNOW_NOT_FOUND : peer is not found
Parameters
peer_addr: peer MAC address
esp_err_t esp_now_mod_peer(const esp_now_peer_info_t *peer)
Modify a peer.
Return
ESP_OK : succeed
ESP_ERR_ESPNOW_NOT_INIT : ESPNOW is not initialized
ESP_ERR_ESPNOW_ARG : invalid argument
ESP_ERR_ESPNOW_FULL : peer list is full
Parameters
peer: peer information
esp_err_t esp_now_get_peer(const uint8_t *peer_addr, esp_now_peer_info_t *peer)
Get a peer whose MAC address matches peer_addr from peer list.
Return
ESP_OK : succeed
ESP_ERR_ESPNOW_NOT_INIT : ESPNOW is not initialized
ESP_ERR_ESPNOW_ARG : invalid argument
ESP_ERR_ESPNOW_NOT_FOUND : peer is not found
Parameters
peer_addr: peer MAC address
peer: peer information
esp_err_t esp_now_fetch_peer(bool from_head, esp_now_peer_info_t *peer)
Fetch a peer from peer list. Only return the peer which address is unicast, for the multicast/broadcast address,
the function will ignore and try to find the next in the peer list.
Return
ESP_OK : succeed
ESP_ERR_ESPNOW_NOT_INIT : ESPNOW is not initialized
ESP_ERR_ESPNOW_ARG : invalid argument
ESP_ERR_ESPNOW_NOT_FOUND : peer is not found
Parameters
from_head: fetch from head of list or not
peer: peer information
bool esp_now_is_peer_exist(const uint8_t *peer_addr)
Peer exists or not.
Return
true : peer exists
false : peer not exists
Parameters
peer_addr: peer MAC address
esp_err_t esp_now_get_peer_num(esp_now_peer_num_t *num)
Get the number of peers.
Return
ESP_OK : succeed
ESP_ERR_ESPNOW_NOT_INIT : ESPNOW is not initialized
ESP_ERR_ESPNOW_ARG : invalid argument
Parameters
num: number of peers
esp_err_t esp_now_set_pmk(const uint8_t *pmk)
Set the primary master key.
Attention 1. primary master key is used to encrypt local master key
Return
Espressif Systems 132
Submit Document Feedback
Release v4.4

Table of Contents