smartconfig_ack.h 872 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. /*
  2. * SPDX-FileCopyrightText: 2010-2023 Espressif Systems (Shanghai) CO LTD
  3. *
  4. * SPDX-License-Identifier: Apache-2.0
  5. */
  6. #ifndef SMARTCONFIG_ACK_H
  7. #define SMARTCONFIG_ACK_H
  8. #include "esp_smartconfig.h"
  9. #include "esp_err.h"
  10. #include <stdint.h>
  11. #ifdef __cplusplus
  12. extern "C" {
  13. #endif
  14. /**
  15. * @brief Send smartconfig ACK to cellphone.
  16. *
  17. * @attention The API can only be used when receiving SC_EVENT_GOT_SSID_PSWD event.
  18. *
  19. * @param type: smartconfig type(ESPTouch or AirKiss);
  20. * token: token from the cellphone;
  21. * cellphone_ip: IP address of the cellphone;
  22. *
  23. * @return ESP_OK: succeed
  24. * others: fail
  25. */
  26. esp_err_t sc_send_ack_start(smartconfig_type_t type, uint8_t token, uint8_t *cellphone_ip);
  27. /**
  28. * @brief Stop sending smartconfig ACK to cellphone.
  29. */
  30. void sc_send_ack_stop(void);
  31. #ifdef __cplusplus
  32. }
  33. #endif
  34. #endif