at_sample_n58.c 949 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. * 2020-05-22 shuobatian first version
  9. */
  10. #include <at_device_n58.h>
  11. #define LOG_TAG "at.sample"
  12. #include <at_log.h>
  13. #define N58_SAMPLE_DEIVCE_NAME "n58"
  14. static struct at_device_n58 sim0 =
  15. {
  16. N58_SAMPLE_DEIVCE_NAME,
  17. N58_SAMPLE_CLIENT_NAME,
  18. N58_SAMPLE_POWER_PIN,
  19. N58_SAMPLE_STATUS_PIN,
  20. N58_SAMPLE_RECV_BUFF_LEN,
  21. };
  22. static int n58_device_register(void)
  23. {
  24. struct at_device_n58 *n58 = &sim0;
  25. return at_device_register(&(n58->device),
  26. n58->device_name,
  27. n58->client_name,
  28. AT_DEVICE_CLASS_N58,
  29. (void *) n58);
  30. }
  31. INIT_APP_EXPORT(n58_device_register);
  32. //MSH_CMD_EXPORT(n58_device_register,n58_device_register);