1 /*=======0=========1=========2=========3=========4=========5=========6=========7=========8=========9=========0=========1====*/
2 // ==== Definitions ====
4 \addtogroup CMSIS_RTOS_Definitions Definitions
6 \brief Constants and enumerations used by many CMSIS-RTOS functions.
7 \details The following constants and enumerations are used by many CMSIS-RTOS function calls.
10 /*=======0=========1=========2=========3=========4=========5=========6=========7=========8=========9=========0=========1====*/
14 The \b osStatus_t enumeration defines the event status and error codes that are returned by many CMSIS-RTOS functions.
19 \details A special \ref CMSIS_RTOS_TimeOutValue that informs the RTOS to wait infinite until a resource becomes available.
20 It applies to the following functions:
21 - \ref osDelay : \copybrief osDelay
22 - \ref osThreadFlagsWait : \copybrief osThreadFlagsWait
23 - \ref osEventFlagsWait : \copybrief osEventFlagsWait
24 - \ref osMutexAcquire : \copybrief osMutexAcquire
25 - \ref osSemaphoreAcquire : \copybrief osSemaphoreAcquire
26 - \ref osMemoryPoolAlloc : \copybrief osMemoryPoolAlloc
27 - \ref osMessageQueuePut : \copybrief osMessageQueuePut
28 - \ref osMessageQueueGet : \copybrief osMessageQueueGet
31 /*=======0=========1=========2=========3=========4=========5=========6=========7=========8=========9=========0=========1====*/
32 /** \def osFlagsWaitAny
35 - \ref osEventFlagsWait
36 - \ref osThreadFlagsWait
38 /*=======0=========1=========2=========3=========4=========5=========6=========7=========8=========9=========0=========1====*/
39 /** \def osFlagsWaitAll
42 - \ref osEventFlagsWait
43 - \ref osThreadFlagsWait
45 /*=======0=========1=========2=========3=========4=========5=========6=========7=========8=========9=========0=========1====*/
46 /** \def osFlagsNoClear
49 - \ref osEventFlagsWait
50 - \ref osThreadFlagsWait
55 \addtogroup flags_error_codes Flags Functions Error Codes
56 \ingroup CMSIS_RTOS_Definitions
57 \brief Constants used by \ref CMSIS_RTOS_ThreadFlagsMgmt and \ref CMSIS_RTOS_EventFlags to return error codes.
58 \details In case of an error, flags functions (\ref CMSIS_RTOS_ThreadFlagsMgmt and
59 \ref CMSIS_RTOS_EventFlags) return error codes. To indicate that an error has occurred, the highest bit of
60 the return value is be set. You can check the exact error using the codes shown below.
63 /*=======0=========1=========2=========3=========4=========5=========6=========7=========8=========9=========0=========1====*/
64 /** \def osFlagsErrorUnknown
65 \details Generic error. It is returned when no other error can be applied.
68 - \ref osThreadFlagsSet
69 - \ref osThreadFlagsClear
70 - \ref osThreadFlagsWait
71 - \ref osEventFlagsSet
72 - \ref osEventFlagsClear
73 - \ref osEventFlagsWait
76 /*=======0=========1=========2=========3=========4=========5=========6=========7=========8=========9=========0=========1====*/
77 /** \def osFlagsErrorTimeout
78 \details This error is returned if a timeout was specified and the specified flags were not set, when the
82 - \ref osThreadFlagsSet
83 - \ref osThreadFlagsClear
84 - \ref osThreadFlagsWait
85 - \ref osEventFlagsSet
86 - \ref osEventFlagsClear
87 - \ref osEventFlagsWait
90 /*=======0=========1=========2=========3=========4=========5=========6=========7=========8=========9=========0=========1====*/
91 /** \def osFlagsErrorResource
92 \details This error is returned when you try to get a flag that was not set \a and timeout 0 was
93 specified. Is also returned when the specified object identifier is corrupt or invalid.
96 - \ref osThreadFlagsSet
97 - \ref osThreadFlagsClear
98 - \ref osThreadFlagsWait
99 - \ref osEventFlagsSet
100 - \ref osEventFlagsClear
101 - \ref osEventFlagsWait
104 /*=======0=========1=========2=========3=========4=========5=========6=========7=========8=========9=========0=========1====*/
105 /** \def osFlagsErrorParameter
106 \details This error is returned when a given parameter is wrong.
109 - \ref osThreadFlagsSet
110 - \ref osThreadFlagsClear
111 - \ref osThreadFlagsWait
112 - \ref osEventFlagsSet
113 - \ref osEventFlagsClear
114 - \ref osEventFlagsWait
117 /*=======0=========1=========2=========3=========4=========5=========6=========7=========8=========9=========0=========1====*/
118 /** \def osFlagsErrorISR
119 \details This error is returned when a non-ISR-callable function was called from an ISR.
122 - \ref osThreadFlagsSet
123 - \ref osThreadFlagsClear
124 - \ref osThreadFlagsWait
125 - \ref osEventFlagsSet
126 - \ref osEventFlagsClear
127 - \ref osEventFlagsWait