diff --git a/include/zh_espnow.h b/include/zh_espnow.h index b302c91..5213dc5 100644 --- a/include/zh_espnow.h +++ b/include/zh_espnow.h @@ -121,6 +121,13 @@ extern "C" */ void zh_espnow_reset_stats(void); + /** + * @brief Check ESP-NOW initialization status. + * + * @return true if ESP-NOW is initialized false otherwise. + */ + bool zh_espnow_is_initialized(void); + #ifdef __cplusplus } #endif \ No newline at end of file diff --git a/version.txt b/version.txt index 867e524..589268e 100644 --- a/version.txt +++ b/version.txt @@ -1 +1 @@ -1.2.0 \ No newline at end of file +1.3.0 \ No newline at end of file diff --git a/zh_espnow.c b/zh_espnow.c index 9929642..5b45469 100755 --- a/zh_espnow.c +++ b/zh_espnow.c @@ -516,4 +516,9 @@ void zh_espnow_reset_stats(void) _stats.sent_fail = 0; _stats.received = 0; ZH_ESPNOW_LOGI("ESP-NOW statistic reset successfully."); +} + +bool zh_espnow_is_initialized(void) +{ + return _is_initialized; } \ No newline at end of file