at_sample_air720.c 1007 B

123456789101112131415161718192021222324252627282930313233343536373839
  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-07 liang.shao first version
  9. */
  10. #include <at_device_air720.h>
  11. #define LOG_TAG "at.sample"
  12. #include <at_log.h>
  13. #define AIR720_SAMPLE_DEIVCE_NAME "air720"
  14. static struct at_device_air720 sim0 =
  15. {
  16. AIR720_SAMPLE_DEIVCE_NAME,
  17. AIR720_SAMPLE_CLIENT_NAME,
  18. AIR720_SAMPLE_POWER_PIN,
  19. AIR720_SAMPLE_STATUS_PIN,
  20. AIR720_SAMPLE_RECV_BUFF_LEN,
  21. };
  22. static int air720_device_register(void)
  23. {
  24. struct at_device_air720 *air720 = &sim0;
  25. return at_device_register(&(air720->device),
  26. air720->device_name,
  27. air720->client_name,
  28. AT_DEVICE_CLASS_AIR720,
  29. (void *) air720);
  30. }
  31. INIT_APP_EXPORT(air720_device_register);
  32. //MSH_CMD_EXPORT(air720_device_register,air720_device_register);