at_device_bc26.h 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  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-12-13 qiyongzhong first version
  9. */
  10. #ifndef __AT_DEVICE_BC26_H__
  11. #define __AT_DEVICE_BC26_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 bc26 device */
  18. #define AT_DEVICE_BC26_SOCKETS_NUM 5
  19. struct at_device_bc26
  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. rt_bool_t power_status;
  30. rt_bool_t sleep_status;
  31. };
  32. #ifdef AT_USING_SOCKET
  33. /* bc26 device socket initialize */
  34. int bc26_socket_init(struct at_device *device);
  35. /* bc26 device class socket register */
  36. int bc26_socket_class_register(struct at_device_class *class);
  37. #endif /* AT_USING_SOCKET */
  38. #ifdef __cplusplus
  39. }
  40. #endif
  41. #endif /* __AT_DEVICE_BC26_H__ */