/*=======0=========1=========2=========3=========4=========5=========6=========7=========8=========9=========0=========1====*/
// ==== Definitions ====
/**
\addtogroup CMSIS_RTOS_Definitions Definitions
\ingroup CMSIS_RTOS
\brief Constants and enumerations used by many CMSIS-RTOS functions.
\details The following constants and enumerations are used by many CMSIS-RTOS function calls.
@{
*/
/*=======0=========1=========2=========3=========4=========5=========6=========7=========8=========9=========0=========1====*/
/**
\typedef osStatus_t
\details
The \b osStatus_t enumeration defines the event status and error codes that are returned by many CMSIS-RTOS functions.
*/

/**
\def osWaitForever
\details A special \ref CMSIS_RTOS_TimeOutValue that informs the RTOS to wait infinite until a resource becomes available.
It applies to the following functions: 
 - \ref osDelay : \copybrief osDelay
 - \ref osThreadFlagsWait : \copybrief osThreadFlagsWait 
 - \ref osEventFlagsWait : \copybrief osEventFlagsWait
 - \ref osMutexAcquire : \copybrief osMutexAcquire
 - \ref osSemaphoreAcquire : \copybrief osSemaphoreAcquire
 - \ref osMemoryPoolAlloc : \copybrief osMemoryPoolAlloc
 - \ref osMessageQueuePut : \copybrief osMessageQueuePut
 - \ref osMessageQueueGet : \copybrief osMessageQueueGet
*/

/*=======0=========1=========2=========3=========4=========5=========6=========7=========8=========9=========0=========1====*/
/** \def osFlagsWaitAny

Reference: 
 - \ref osEventFlagsWait
 - \ref osThreadFlagsWait
*/
/*=======0=========1=========2=========3=========4=========5=========6=========7=========8=========9=========0=========1====*/
/** \def osFlagsWaitAll

Reference: 
 - \ref osEventFlagsWait
 - \ref osThreadFlagsWait
*/
/*=======0=========1=========2=========3=========4=========5=========6=========7=========8=========9=========0=========1====*/
/** \def osFlagsNoClear

Reference: 
 - \ref osEventFlagsWait
 - \ref osThreadFlagsWait
*/

/*=======0=========1=========2=========3=========4=========5=========6=========7=========8=========9=========0=========1====*/
/**
\def osSafetyClass(n)
\param         n        safety class value.
\brief  Safety class value in attribute bit field format.
\details

The preprocessor macro \b osSafetyClass constructs attribute bitmask with safety class bits set to \a n.

<b>Code Example:</b>
\code
/* Event Flags object attributes */
const osEventFlagsAttr_t ef_attr = {
  .name       = "EventFlags1",    // human readable object name
  .attr_bits  = osSafetyClass(2U) // assign object to safety class 2
};
\endcode
*/

/*=======0=========1=========2=========3=========4=========5=========6=========7=========8=========9=========0=========1====*/
/**
\def osSafetyWithSameClass
\details
Definition for RTOS objects with the same safety class. Can be used as mode argument in the following functions:
 - \ref osThreadSuspendClass : \copybrief osThreadSuspendClass
 - \ref osThreadResumeClass : \copybrief osThreadResumeClass
 - \ref osKernelDestroyClass : \copybrief osKernelDestroyClass

\def osSafetyWithLowerClass
\details
Definition for RTOS objects with lower safety class.  Can be used as mode argument in the following functions:
 - \ref osThreadSuspendClass : \copybrief osThreadSuspendClass
 - \ref osThreadResumeClass : \copybrief osThreadResumeClass
 - \ref osKernelDestroyClass : \copybrief osKernelDestroyClass
*/

/// @}
/**
\addtogroup flags_error_codes Flags Functions Error Codes
\ingroup CMSIS_RTOS_Definitions
\brief Constants used by \ref CMSIS_RTOS_ThreadFlagsMgmt and \ref CMSIS_RTOS_EventFlags to return error codes.
\details In case of an error, flags functions (\ref CMSIS_RTOS_ThreadFlagsMgmt and
\ref CMSIS_RTOS_EventFlags) return error codes. To indicate that an error has occurred, the highest bit of
the return value is be set. You can check the exact error using the codes shown below.
@{
*/
/*=======0=========1=========2=========3=========4=========5=========6=========7=========8=========9=========0=========1====*/
/** \def osFlagsErrorUnknown
\details Generic error. It is returned when no other error can be applied. 

Reference: 
 - \ref osThreadFlagsSet
 - \ref osThreadFlagsClear
 - \ref osThreadFlagsWait
 - \ref osEventFlagsSet
 - \ref osEventFlagsClear
 - \ref osEventFlagsWait
*/

/*=======0=========1=========2=========3=========4=========5=========6=========7=========8=========9=========0=========1====*/
/** \def osFlagsErrorTimeout
\details This error is returned if a timeout was specified and the specified flags were not set, when the
timeout occurred.

Reference: 
 - \ref osThreadFlagsSet
 - \ref osThreadFlagsClear
 - \ref osThreadFlagsWait
 - \ref osEventFlagsSet
 - \ref osEventFlagsClear
 - \ref osEventFlagsWait
*/

/*=======0=========1=========2=========3=========4=========5=========6=========7=========8=========9=========0=========1====*/
/** \def osFlagsErrorResource
\details This error is returned when you try to get a flag that was not set \a and timeout 0 was
specified. Is also returned when the specified object identifier is corrupt or invalid.

Reference: 
 - \ref osThreadFlagsSet
 - \ref osThreadFlagsClear
 - \ref osThreadFlagsWait
 - \ref osEventFlagsSet
 - \ref osEventFlagsClear
 - \ref osEventFlagsWait
*/

/*=======0=========1=========2=========3=========4=========5=========6=========7=========8=========9=========0=========1====*/
/** \def osFlagsErrorParameter
\details This error is returned when a given parameter is wrong.

Reference: 
 - \ref osThreadFlagsSet
 - \ref osThreadFlagsClear
 - \ref osThreadFlagsWait
 - \ref osEventFlagsSet
 - \ref osEventFlagsClear
 - \ref osEventFlagsWait
*/

/*=======0=========1=========2=========3=========4=========5=========6=========7=========8=========9=========0=========1====*/
/** \def osFlagsErrorISR
\details This error is returned when a non-ISR-callable function was called from an ISR.

Reference: 
 - \ref osThreadFlagsSet
 - \ref osThreadFlagsClear
 - \ref osThreadFlagsWait
 - \ref osEventFlagsSet
 - \ref osEventFlagsClear
 - \ref osEventFlagsWait
*/

/// @} 
