at_sample_bc28.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. * 2020-02-13 luhuadong first version
  9. */
  10. #include <at_device_bc28.h>
  11. #define LOG_TAG "at.sample.bc28"
  12. #include <at_log.h>
  13. #define BC28_SAMPLE_DEIVCE_NAME "bc28"
  14. static struct at_device_bc28 _dev =
  15. {
  16. BC28_SAMPLE_DEIVCE_NAME,
  17. BC28_SAMPLE_CLIENT_NAME,
  18. BC28_SAMPLE_POWER_PIN,
  19. BC28_SAMPLE_STATUS_PIN,
  20. BC28_SAMPLE_RECV_BUFF_LEN,
  21. };
  22. static int bc28_device_register(void)
  23. {
  24. struct at_device_bc28 *bc28 = &_dev;
  25. return at_device_register(&(bc28->device),
  26. bc28->device_name,
  27. bc28->client_name,
  28. AT_DEVICE_CLASS_BC28,
  29. (void *) bc28);
  30. }
  31. INIT_APP_EXPORT(bc28_device_register);