@@ -57,8 +57,8 @@ extern "C" {
5757 * @brief Status of sending ESPNOW data .
5858 */
5959typedef enum {
60- ESP_NOW_SEND_SUCCESS = 0 , /**< Send ESPNOW data successfully */
61- ESP_NOW_SEND_FAIL , /**< Send ESPNOW data fail */
60+ ESP_NOW_SEND_SUCCESS = WIFI_SEND_SUCCESS , /**< Send ESPNOW data successfully */
61+ ESP_NOW_SEND_FAIL = WIFI_SEND_FAIL , /**< Send ESPNOW data fail */
6262} esp_now_send_status_t ;
6363
6464/**
@@ -84,14 +84,19 @@ typedef struct esp_now_peer_num {
8484} esp_now_peer_num_t ;
8585
8686/**
87- * @brief ESPNOW packet information
87+ * @brief ESPNOW receive packet information
8888 */
8989typedef struct esp_now_recv_info {
9090 uint8_t * src_addr ; /**< Source address of ESPNOW packet */
9191 uint8_t * des_addr ; /**< Destination address of ESPNOW packet */
9292 wifi_pkt_rx_ctrl_t * rx_ctrl ; /**< Rx control info of ESPNOW packet */
9393} esp_now_recv_info_t ;
9494
95+ /**
96+ * @brief ESPNOW sending packet information
97+ */
98+ typedef wifi_tx_info_t esp_now_send_info_t ;
99+
95100/**
96101 * @brief ESPNOW rate config
97102 */
@@ -108,10 +113,10 @@ typedef void (*esp_now_recv_cb_t)(const esp_now_recv_info_t * esp_now_info, cons
108113
109114/**
110115 * @brief Callback function of sending ESPNOW data
111- * @param mac_addr peer MAC address
112- * @param status status of sending ESPNOW data (succeed or fail)
116+ * @param esp_now_send_info_t Sending information for ESPNOW data
117+ * @param status status of sending ESPNOW data (succeed or fail). This is will be removed later, since the tx_info->tx_status also works.
113118 */
114- typedef void (* esp_now_send_cb_t )(const uint8_t * mac_addr , esp_now_send_status_t status );
119+ typedef void (* esp_now_send_cb_t )(const esp_now_send_info_t * tx_info , esp_now_send_status_t status );
115120
116121/**
117122 * @brief Initialize ESPNOW function
0 commit comments