ping: add stop function

ping in raw mode does some set up and sets timeout, but clean
up procedure is missing. That is needed for case if PING_RESULT() macro
is used for application exit.

Also implement stop functionality when using sockets.
Running ping is stopped when calling ping_init() again.

Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
Signed-off-by: Simon Goldschmidt <goldsimon@gmx.de>
This commit is contained in:
Maxim Uvarov
2023-09-15 16:42:33 +02:00
committed by Simon Goldschmidt
parent 36cb95c4d2
commit 4e6dd9c576
2 changed files with 33 additions and 1 deletions

View File

@@ -11,6 +11,7 @@
#endif
void ping_init(const ip_addr_t* ping_addr);
void ping_stop(void);
#if !PING_USE_SOCKETS
void ping_send_now(void);