From 87d3986b87281788338b4a47cc4fec38fe16df39 Mon Sep 17 00:00:00 2001 From: XiaXiaotian Date: Tue, 31 Oct 2017 11:52:05 +0800 Subject: [PATCH] Fix the return value of esp_now_send() --- components/esp32/include/esp_now.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/components/esp32/include/esp_now.h b/components/esp32/include/esp_now.h index 497d73776..4a0a4be7d 100644 --- a/components/esp32/include/esp_now.h +++ b/components/esp32/include/esp_now.h @@ -48,6 +48,7 @@ extern "C" { #define ESP_ERR_ESPNOW_NOT_FOUND (ESP_ERR_ESPNOW_BASE + 4) /*!< ESPNOW peer is not found */ #define ESP_ERR_ESPNOW_INTERNAL (ESP_ERR_ESPNOW_BASE + 5) /*!< Internal error */ #define ESP_ERR_ESPNOW_EXIST (ESP_ERR_ESPNOW_BASE + 6) /*!< ESPNOW peer has existed */ +#define ESP_ERR_ESPNOW_IF (ESP_ERR_ESPNOW_BASE + 7) /*!< Interface error */ #define ESP_NOW_ETH_ALEN 6 /*!< Length of ESPNOW peer MAC address */ #define ESP_NOW_KEY_LEN 16 /*!< Length of ESPNOW peer local master key */ @@ -191,6 +192,7 @@ esp_err_t esp_now_unregister_send_cb(void); * - ESP_ERR_ESPNOW_INTERNAL : internal error * - ESP_ERR_ESPNOW_NO_MEM : out of memory * - ESP_ERR_ESPNOW_NOT_FOUND : peer is not found + * - ESP_ERR_ESPNOW_IF : current WiFi interface doesn't match that of peer */ esp_err_t esp_now_send(const uint8_t *peer_addr, const uint8_t *data, size_t len);