platform_thread.h 1.0 KB

1234567891011121314151617181920212223242526272829
  1. /*
  2. * @Author: jiejie
  3. * @Github: https://github.com/jiejieTop
  4. * @Date: 2019-12-15 18:31:44
  5. * @LastEditTime: 2020-04-27 17:04:25
  6. * @Description: the code belongs to jiejie, please keep the author information and source code according to the license.
  7. */
  8. #ifndef _PLATFORM_THREAD_H_
  9. #define _PLATFORM_THREAD_H_
  10. #include "FreeRTOS.h"
  11. #include "task.h"
  12. typedef struct platform_thread {
  13. TaskHandle_t thread;
  14. } platform_thread_t;
  15. platform_thread_t *platform_thread_init( const char *name,
  16. void (*entry)(void *),
  17. void * const param,
  18. unsigned int stack_size,
  19. unsigned int priority,
  20. unsigned int tick);
  21. void platform_thread_startup(platform_thread_t* thread);
  22. void platform_thread_stop(platform_thread_t* thread);
  23. void platform_thread_start(platform_thread_t* thread);
  24. void platform_thread_destroy(platform_thread_t* thread);
  25. #endif