mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
feat(wifi_prov): Add API for checking whether the provisioning state machine is idle
This commit is contained in:
parent
3cd7fb6321
commit
55acf50c48
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2019-2022 Espressif Systems (Shanghai) CO LTD
|
||||
* SPDX-FileCopyrightText: 2019-2023 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
@ -282,6 +282,13 @@ void wifi_prov_mgr_deinit(void);
|
||||
*/
|
||||
esp_err_t wifi_prov_mgr_is_provisioned(bool *provisioned);
|
||||
|
||||
/**
|
||||
* @brief Checks whether the provisioning state machine is idle
|
||||
*
|
||||
* @return True if state machine is idle, else false
|
||||
*/
|
||||
bool wifi_prov_mgr_is_sm_idle(void);
|
||||
|
||||
/**
|
||||
* @brief Start provisioning service
|
||||
*
|
||||
|
@ -1214,6 +1214,11 @@ esp_err_t wifi_prov_mgr_is_provisioned(bool *provisioned)
|
||||
return ESP_OK;
|
||||
}
|
||||
|
||||
bool wifi_prov_mgr_is_sm_idle(void)
|
||||
{
|
||||
return (prov_ctx->prov_state == WIFI_PROV_STATE_IDLE);
|
||||
}
|
||||
|
||||
static void wifi_connect_timer_cb(void *arg)
|
||||
{
|
||||
if (esp_wifi_connect() != ESP_OK) {
|
||||
|
Loading…
Reference in New Issue
Block a user