application.c 939 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. /*
  2. * File : application.c
  3. * This file is part of RT-Thread RTOS
  4. * COPYRIGHT (C) 2015, RT-Thread Development Team
  5. *
  6. * The license and distribution terms for this file may be
  7. * found in the file LICENSE in this distribution or at
  8. * http://www.rt-thread.org/license/LICENSE
  9. *
  10. * Change Logs:
  11. * Date Author Notes
  12. * 2015-03-01 Yangfs the first version
  13. * 2015-03-27 Bernard code cleanup.
  14. */
  15. /**
  16. * @addtogroup NRF52832
  17. */
  18. /*@{*/
  19. #include <rtthread.h>
  20. #ifdef RT_USING_FINSH
  21. #include <finsh.h>
  22. #include <shell.h>
  23. #endif
  24. void rt_init_thread_entry(void* parameter)
  25. {
  26. extern rt_err_t ble_init(void);
  27. ble_init();
  28. }
  29. int rt_application_init(void)
  30. {
  31. rt_thread_t tid;
  32. tid = rt_thread_create("init", rt_init_thread_entry, RT_NULL, 1024,
  33. RT_THREAD_PRIORITY_MAX / 3, 20);
  34. if (tid != RT_NULL)
  35. rt_thread_startup(tid);
  36. return 0;
  37. }
  38. /*@}*/