at_sample_bc26.c 923 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-13 qiyongzhong first version
  9. */
  10. #include <at_device_bc26.h>
  11. #define LOG_TAG "at.sample.bc26"
  12. #include <at_log.h>
  13. #define BC26_SAMPLE_DEIVCE_NAME "bc26"
  14. static struct at_device_bc26 _dev =
  15. {
  16. BC26_SAMPLE_DEIVCE_NAME,
  17. BC26_SAMPLE_CLIENT_NAME,
  18. BC26_SAMPLE_POWER_PIN,
  19. BC26_SAMPLE_STATUS_PIN,
  20. BC26_SAMPLE_RECV_BUFF_LEN,
  21. };
  22. static int bc26_device_register(void)
  23. {
  24. struct at_device_bc26 *bc26 = &_dev;
  25. return at_device_register(&(bc26->device),
  26. bc26->device_name,
  27. bc26->client_name,
  28. AT_DEVICE_CLASS_BC26,
  29. (void *) bc26);
  30. }
  31. INIT_APP_EXPORT(bc26_device_register);