cmsis_os.h 833 B

123456789101112131415161718192021222324252627282930
  1. #include "main.h"
  2. #include <stdbool.h>
  3. void osDelay(uint32_t ms);
  4. // some FreeRTOS types
  5. typedef void(*TaskFunction_t)(void*);
  6. typedef uint32_t UBaseType_t;
  7. typedef uint32_t StackType_t;
  8. typedef uint32_t StaticTask_t;
  9. typedef pthread_t* TaskHandle_t;
  10. typedef uint32_t StaticSemaphore_t;
  11. typedef void* SemaphoreHandle_t;
  12. #define tskIDLE_PRIORITY 0
  13. TaskHandle_t xTaskCreateStatic(
  14. TaskFunction_t pxTaskCode,
  15. const char * const pcName,
  16. const uint32_t ulStackDepth,
  17. void * const pvParameters,
  18. UBaseType_t uxPriority,
  19. StackType_t * const puxStackBuffer,
  20. StaticTask_t * const pxTaskBuffer
  21. );
  22. void vTaskDelete(TaskHandle_t xTask);
  23. TaskHandle_t xTaskGetCurrentTaskHandle(void);
  24. SemaphoreHandle_t xSemaphoreCreateMutexStatic(StaticSemaphore_t* pxMutexBuffer);
  25. bool task_equal(TaskHandle_t a, TaskHandle_t b);