osObjects.h 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. /*----------------------------------------------------------------------------
  2. * osObjects.h: CMSIS-RTOS global object definitions for an application
  3. *----------------------------------------------------------------------------
  4. *
  5. * This header file defines global RTOS objects used throughout a project
  6. *
  7. * #define osObjectsPublic indicates that objects are defined; without that
  8. * definition the objects are defined as external symbols.
  9. *
  10. *--------------------------------------------------------------------------*/
  11. #ifndef __osObjects
  12. #define __osObjects
  13. #if (!defined (osObjectsPublic))
  14. #define osObjectsExternal // define RTOS objects with extern attribute
  15. #endif
  16. #include "cmsis_os2.h" // CMSIS RTOS header file
  17. // global 'thread' functions ---------------------------------------------------
  18. /*
  19. Example:
  20. extern void *sample_name (void *argument); // thread function
  21. osThreadId_t tid_sample_name; // thread id
  22. */
  23. // global 'semaphores' ----------------------------------------------------------
  24. /*
  25. Example:
  26. osSemaphoreId_t sid_sample_name; // semaphore id
  27. */
  28. // global 'memory pools' --------------------------------------------------------
  29. /*
  30. Example:
  31. typedef struct sample_name type_sample_name; // object data type
  32. osMemoryPoolId_t mpid_sample_name; // memory pool id
  33. */
  34. // global 'message queues' -------------------------------------------------------
  35. /*
  36. Example:
  37. typedef struct sample_name type_sample_name; // object data type
  38. osMessageQueueId_t mid_sample_name; // message queue id
  39. */