at_device_sim76xx.h 992 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_SIM76XX_H__
  11. #define __AT_DEVICE_SIM76XX_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 sim76xx device */
  18. #define AT_DEVICE_SIM76XX_SOCKETS_NUM 10
  19. struct at_device_sim76xx
  20. {
  21. char *device_name;
  22. char *client_name;
  23. int power_pin;
  24. int power_status_pin;
  25. size_t recv_line_num;
  26. struct at_device device;
  27. void *user_data;
  28. };
  29. #ifdef AT_USING_SOCKET
  30. /* sim76xx device socket initialize */
  31. int sim76xx_socket_init(struct at_device *device);
  32. /* sim76xx device class socket register */
  33. int sim76xx_socket_class_register(struct at_device_class *class);
  34. #endif /* AT_USING_SOCKET */
  35. #ifdef __cplusplus
  36. }
  37. #endif
  38. #endif /* __AT_DEVICE_SIM76XX_H__ */