2023-08-31 02:58:58 -04:00
|
|
|
/*
|
|
|
|
* SPDX-FileCopyrightText: 2010-2023 Espressif Systems (Shanghai) CO LTD
|
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
|
|
*/
|
2017-09-13 04:42:45 -04:00
|
|
|
|
2018-04-09 02:29:53 -04:00
|
|
|
#ifndef SMARTCONFIG_ACK_H
|
|
|
|
#define SMARTCONFIG_ACK_H
|
2017-09-13 04:42:45 -04:00
|
|
|
|
2023-08-31 02:58:58 -04:00
|
|
|
#include "esp_smartconfig.h"
|
|
|
|
#include "esp_err.h"
|
|
|
|
#include <stdint.h>
|
|
|
|
|
2017-09-13 04:42:45 -04:00
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @brief Send smartconfig ACK to cellphone.
|
|
|
|
*
|
2019-04-16 23:44:51 -04:00
|
|
|
* @attention The API can only be used when receiving SC_EVENT_GOT_SSID_PSWD event.
|
2017-09-13 04:42:45 -04:00
|
|
|
*
|
2019-04-16 23:44:51 -04:00
|
|
|
* @param type: smartconfig type(ESPTouch or AirKiss);
|
|
|
|
* token: token from the cellphone;
|
|
|
|
* cellphone_ip: IP address of the cellphone;
|
|
|
|
*
|
2021-02-01 22:41:52 -05:00
|
|
|
* @return ESP_OK: succeed
|
2019-04-16 23:44:51 -04:00
|
|
|
* others: fail
|
2017-09-13 04:42:45 -04:00
|
|
|
*/
|
2019-04-16 23:44:51 -04:00
|
|
|
esp_err_t sc_send_ack_start(smartconfig_type_t type, uint8_t token, uint8_t *cellphone_ip);
|
2017-09-13 04:42:45 -04:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @brief Stop sending smartconfig ACK to cellphone.
|
|
|
|
*/
|
2019-04-16 23:44:51 -04:00
|
|
|
void sc_send_ack_stop(void);
|
2017-09-13 04:42:45 -04:00
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
#endif
|