at_device_esp32.h 968 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. /*
  2. * Copyright (c) 2006-2023, RT-Thread Development Team
  3. *
  4. * SPDX-License-Identifier: Apache-2.0
  5. *
  6. * Change Logs:
  7. * Date Author Notes
  8. * 2019-05-16 chenyong first version
  9. */
  10. #ifndef __AT_DEVICE_ESP32_H__
  11. #define __AT_DEVICE_ESP32_H__
  12. #ifdef __cplusplus
  13. extern "C" {
  14. #endif
  15. #include <stdlib.h>
  16. #include <at_device.h>
  17. /* The maximum number of sockets supported by the esp32 device */
  18. #define AT_DEVICE_ESP32_SOCKETS_NUM 5
  19. struct at_device_esp32
  20. {
  21. char *device_name;
  22. char *client_name;
  23. char *wifi_ssid;
  24. char *wifi_password;
  25. size_t recv_line_num;
  26. struct at_device device;
  27. void *user_data;
  28. };
  29. #ifdef AT_USING_SOCKET
  30. /* esp32 device socket initialize */
  31. int esp32_socket_init(struct at_device *device);
  32. /* esp32 device class socket register */
  33. int esp32_socket_class_register(struct at_device_class *class);
  34. #endif /* AT_USING_SOCKET */
  35. #ifdef __cplusplus
  36. }
  37. #endif
  38. #endif /* __AT_DEVICE_ESP32_H__ */