application.c 756 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. /*
  2. * Copyright (c) 2006-2021, RT-Thread Development Team
  3. *
  4. * SPDX-License-Identifier: Apache-2.0
  5. *
  6. * Change Logs:
  7. * Date Author Notes
  8. * 2015-03-01 Yangfs the first version
  9. * 2015-03-27 Bernard code cleanup.
  10. */
  11. /**
  12. * @addtogroup NRF52832
  13. */
  14. /*@{*/
  15. #include <rtthread.h>
  16. #ifdef RT_USING_FINSH
  17. #include <finsh.h>
  18. #include <shell.h>
  19. #endif
  20. void rt_init_thread_entry(void* parameter)
  21. {
  22. extern rt_err_t ble_init(void);
  23. ble_init();
  24. }
  25. int rt_application_init(void)
  26. {
  27. rt_thread_t tid;
  28. tid = rt_thread_create("init", rt_init_thread_entry, RT_NULL, 1024,
  29. RT_THREAD_PRIORITY_MAX / 3, 20);
  30. if (tid != RT_NULL)
  31. rt_thread_startup(tid);
  32. return 0;
  33. }
  34. /*@}*/