1 // Copyright 2010-2017 Espressif Systems (Shanghai) PTE LTD 2 // 3 // Licensed under the Apache License, Version 2.0 (the "License"); 4 // you may not use this file except in compliance with the License. 5 // You may obtain a copy of the License at 6 // 7 // http://www.apache.org/licenses/LICENSE-2.0 8 // 9 // Unless required by applicable law or agreed to in writing, software 10 // distributed under the License is distributed on an "AS IS" BASIS, 11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 // See the License for the specific language governing permissions and 13 // limitations under the License. 14 15 #ifndef SMARTCONFIG_ACK_H 16 #define SMARTCONFIG_ACK_H 17 18 #ifdef __cplusplus 19 extern "C" { 20 #endif 21 22 /** 23 * @brief Send smartconfig ACK to cellphone. 24 * 25 * @attention The API can only be used when receiving SC_EVENT_GOT_SSID_PSWD event. 26 * 27 * @param type: smartconfig type(ESPTouch or AirKiss); 28 * token: token from the cellphone; 29 * cellphone_ip: IP address of the cellphone; 30 * 31 * @return ESP_OK: succeed 32 * others: fail 33 */ 34 esp_err_t sc_send_ack_start(smartconfig_type_t type, uint8_t token, uint8_t *cellphone_ip); 35 36 /** 37 * @brief Stop sending smartconfig ACK to cellphone. 38 */ 39 void sc_send_ack_stop(void); 40 41 #ifdef __cplusplus 42 } 43 #endif 44 #endif 45