at_sample_n21.c 947 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_n21.h>
  11. #define LOG_TAG "at.sample"
  12. #include <at_log.h>
  13. #define N21_SAMPLE_DEIVCE_NAME "n21"
  14. static struct at_device_n21 sim0 =
  15. {
  16. N21_SAMPLE_DEIVCE_NAME,
  17. N21_SAMPLE_CLIENT_NAME,
  18. N21_SAMPLE_POWER_PIN,
  19. N21_SAMPLE_STATUS_PIN,
  20. N21_SAMPLE_RECV_BUFF_LEN,
  21. };
  22. static int n21_device_register(void)
  23. {
  24. struct at_device_n21 *n21 = &sim0;
  25. return at_device_register(&(n21->device),
  26. n21->device_name,
  27. n21->client_name,
  28. AT_DEVICE_CLASS_N21,
  29. (void *) n21);
  30. }
  31. INIT_APP_EXPORT(n21_device_register);
  32. //MSH_CMD_EXPORT(n21_device_register,n21_device_register);