smartconfig_ack.h 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  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. #ifndef SMARTCONFIG_ACK_H
  15. #define SMARTCONFIG_ACK_H
  16. #ifdef __cplusplus
  17. extern "C" {
  18. #endif
  19. /**
  20. * @brief Send smartconfig ACK to cellphone.
  21. *
  22. * @attention The API can only be used when receiving SC_EVENT_GOT_SSID_PSWD event.
  23. *
  24. * @param type: smartconfig type(ESPTouch or AirKiss);
  25. * token: token from the cellphone;
  26. * cellphone_ip: IP address of the cellphone;
  27. *
  28. * @return ESP_OK: succeed
  29. * others: fail
  30. */
  31. esp_err_t sc_send_ack_start(smartconfig_type_t type, uint8_t token, uint8_t *cellphone_ip);
  32. /**
  33. * @brief Stop sending smartconfig ACK to cellphone.
  34. */
  35. void sc_send_ack_stop(void);
  36. #ifdef __cplusplus
  37. }
  38. #endif
  39. #endif