at_device_ec20.h 980 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  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_EC20_H__
  11. #define __AT_DEVICE_EC20_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 ec20 device */
  18. #define AT_DEVICE_EC20_SOCKETS_NUM 5
  19. struct at_device_ec20
  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 *socket_data;
  28. void *user_data;
  29. };
  30. #ifdef AT_USING_SOCKET
  31. /* ec20 device socket initialize */
  32. int ec20_socket_init(struct at_device *device);
  33. /* ec20 device class socket register */
  34. int ec20_socket_class_register(struct at_device_class *class);
  35. #endif /* AT_USING_SOCKET */
  36. #ifdef __cplusplus
  37. }
  38. #endif
  39. #endif /* __AT_DEVICE_EC20_H__ */