ping: refactor with new esp_ping_xxx APIs

This refactor is only for backwards compatible.
This commit is contained in:
suda-morris
2019-10-17 14:26:05 +08:00
committed by bot
parent a77e69c408
commit fa32a4bd93
12 changed files with 91 additions and 518 deletions

View File

@@ -42,7 +42,6 @@ typedef struct _ping_found {
uint32_t total_time;
uint32_t min_time;
uint32_t max_time;
uint32_t ping_seqno;
int8_t ping_err;
} esp_ping_found;
@@ -60,7 +59,7 @@ typedef enum {
typedef enum {
PING_RES_TIMEOUT = 0,
PING_RES_OK = 1,
PING_RES_OK = 1,
PING_RES_FINISH = 2,
} ping_res_t;
@@ -103,7 +102,7 @@ esp_err_t esp_ping_get_target(ping_target_id_t opt_id, void *opt_val, uint32_t o
* - ESP_OK
* - ESP_ERR_PING_INVALID_PARAMS
*/
esp_err_t esp_ping_result(uint8_t res_val, uint16_t res_len, uint32_t res_time, uint32_t seqno);
esp_err_t esp_ping_result(uint8_t res_val, uint16_t res_len, uint32_t res_time);
#ifdef __cplusplus
}

View File

@@ -43,10 +43,10 @@ extern "C" {
#endif
int ping_init(void);
int ping_init(void) __attribute__ ((deprecated));
#ifdef ESP_PING
void ping_deinit(void);
void ping_deinit(void) __attribute__ ((deprecated));
#endif
#if !PING_USE_SOCKETS