57 ESP_NOW_ROLE_IDLE = 0,
58 ESP_NOW_ROLE_CONTROLLER,
176 sint32
esp_now_add_peer(uint8 *mac_addr, uint8 role, uint8 channel, uint8 *key, uint8 key_len);
sint32 esp_now_set_peer_role(uint8 *mac_addr, uint8 role)
Set ESP-NOW role for a target device. If it is set multiple times, new role will cover the old one...
sint32 esp_now_del_peer(uint8 *mac_addr)
Delete an ESP-NOW peer, delete MAC address of the device from ESP-NOW MAC list.
sint32 esp_now_get_peer_role(uint8 *mac_addr)
Get ESP-NOW role of a target device.
void(* esp_now_send_cb_t)(uint8 *mac_addr, uint8 status)
ESP-NOW send callback.
Definition: espnow.h:88
sint32 esp_now_get_cnt_info(uint8 *all_cnt, uint8 *encrypt_cnt)
Get the total number of ESP-NOW devices which are associated, and the number count of encrypted devic...
sint32 esp_now_register_send_cb(esp_now_send_cb_t cb)
Register ESP-NOW send callback.
sint32 esp_now_register_recv_cb(esp_now_recv_cb_t cb)
Register ESP-NOW receive callback.
sint32 esp_now_set_peer_channel(uint8 *mac_addr, uint8 channel)
Record channel information of a ESP-NOW device.
sint32 esp_now_set_self_role(uint8 role)
Set ESP-NOW role of device itself.
sint32 esp_now_unregister_send_cb(void)
Unregister ESP-NOW send callback.
sint32 esp_now_init(void)
ESP-NOW initialization.
uint8 * esp_now_fetch_peer(bool restart)
Get MAC address of ESP-NOW device.
sint32 esp_now_set_peer_key(uint8 *mac_addr, uint8 *key, uint8 key_len)
Set ESP-NOW key for a target device.
sint32 esp_now_is_peer_exist(uint8 *mac_addr)
Check if target device exists or not.
sint32 esp_now_add_peer(uint8 *mac_addr, uint8 role, uint8 channel, uint8 *key, uint8 key_len)
Add an ESP-NOW peer, store MAC address of target device into ESP-NOW MAC list.
sint32 esp_now_deinit(void)
Deinitialize ESP-NOW.
sint32 esp_now_get_peer_key(uint8 *mac_addr, uint8 *key, uint8 *key_len)
Get ESP-NOW key of a target device.
sint32 esp_now_get_self_role(void)
Get ESP-NOW role of device itself.
sint32 esp_now_unregister_recv_cb(void)
Unregister ESP-NOW receive callback.
void(* esp_now_recv_cb_t)(uint8 *mac_addr, uint8 *data, uint8 len)
ESP-NOW send callback.
Definition: espnow.h:75
sint32 esp_now_send(uint8 *da, uint8 *data, uint8 len)
Send ESP-NOW packet.
sint32 esp_now_get_peer_channel(uint8 *mac_addr)
Get channel information of a ESP-NOW device.
sint32 esp_now_set_kok(uint8 *key, uint8 len)
Set the encrypt key of communication key.