|
|
@@ -17,16 +17,18 @@
|
|
|
*
|
|
|
* ----------------------------------------------------------------------
|
|
|
*
|
|
|
- * $Date: 25. November 2016
|
|
|
+ * $Date: 10. January 2017
|
|
|
* $Revision: V2.1
|
|
|
*
|
|
|
* Project: CMSIS-RTOS2 API
|
|
|
* Title: cmsis_os2.h header file
|
|
|
*
|
|
|
* Version 2.1
|
|
|
- * Support for critical and uncritical sections (nesting safe)
|
|
|
+ * Support for critical and uncritical sections (nesting safe):
|
|
|
* - updated: osKernelLock, osKernelUnlock
|
|
|
* - added: osKernelRestoreLock
|
|
|
+ * Updated Thread and Event Flags:
|
|
|
+ * - changed flags parameter and return type from int32_t to uint32_t
|
|
|
* Version 2.0
|
|
|
* Initial Release
|
|
|
*---------------------------------------------------------------------------*/
|
|
|
@@ -432,24 +434,24 @@ uint32_t osThreadEnumerate (osThreadId_t *thread_array, uint32_t array_items);
|
|
|
/// Set the specified Thread Flags of a thread.
|
|
|
/// \param[in] thread_id thread ID obtained by \ref osThreadNew or \ref osThreadGetId.
|
|
|
/// \param[in] flags specifies the flags of the thread that shall be set.
|
|
|
-/// \return thread flags after setting or error code if negative.
|
|
|
-int32_t osThreadFlagsSet (osThreadId_t thread_id, int32_t flags);
|
|
|
+/// \return thread flags after setting or error code if highest bit set.
|
|
|
+uint32_t osThreadFlagsSet (osThreadId_t thread_id, uint32_t flags);
|
|
|
|
|
|
/// Clear the specified Thread Flags of current running thread.
|
|
|
/// \param[in] flags specifies the flags of the thread that shall be cleared.
|
|
|
-/// \return thread flags before clearing or error code if negative.
|
|
|
-int32_t osThreadFlagsClear (int32_t flags);
|
|
|
+/// \return thread flags before clearing or error code if highest bit set.
|
|
|
+uint32_t osThreadFlagsClear (uint32_t flags);
|
|
|
|
|
|
/// Get the current Thread Flags of current running thread.
|
|
|
/// \return current thread flags.
|
|
|
-int32_t osThreadFlagsGet (void);
|
|
|
+uint32_t osThreadFlagsGet (void);
|
|
|
|
|
|
/// Wait for one or more Thread Flags of the current running thread to become signaled.
|
|
|
/// \param[in] flags specifies the flags to wait for.
|
|
|
/// \param[in] options specifies flags options (osFlagsXxxx).
|
|
|
/// \param[in] timeout \ref CMSIS_RTOS_TimeOutValue or 0 in case of no time-out.
|
|
|
-/// \return thread flags before clearing or error code if negative.
|
|
|
-int32_t osThreadFlagsWait (int32_t flags, uint32_t options, uint32_t timeout);
|
|
|
+/// \return thread flags before clearing or error code if highest bit set.
|
|
|
+uint32_t osThreadFlagsWait (uint32_t flags, uint32_t options, uint32_t timeout);
|
|
|
|
|
|
|
|
|
// ==== Generic Wait Functions ====
|
|
|
@@ -517,27 +519,27 @@ const char *osEventFlagsGetName (osEventFlagsId_t ef_id);
|
|
|
/// Set the specified Event Flags.
|
|
|
/// \param[in] ef_id event flags ID obtained by \ref osEventFlagsNew.
|
|
|
/// \param[in] flags specifies the flags that shall be set.
|
|
|
-/// \return event flags after setting or error code if negative.
|
|
|
-int32_t osEventFlagsSet (osEventFlagsId_t ef_id, int32_t flags);
|
|
|
+/// \return event flags after setting or error code if highest bit set.
|
|
|
+uint32_t osEventFlagsSet (osEventFlagsId_t ef_id, uint32_t flags);
|
|
|
|
|
|
/// Clear the specified Event Flags.
|
|
|
/// \param[in] ef_id event flags ID obtained by \ref osEventFlagsNew.
|
|
|
/// \param[in] flags specifies the flags that shall be cleared.
|
|
|
-/// \return event flags before clearing or error code if negative.
|
|
|
-int32_t osEventFlagsClear (osEventFlagsId_t ef_id, int32_t flags);
|
|
|
+/// \return event flags before clearing or error code if highest bit set.
|
|
|
+uint32_t osEventFlagsClear (osEventFlagsId_t ef_id, uint32_t flags);
|
|
|
|
|
|
/// Get the current Event Flags.
|
|
|
/// \param[in] ef_id event flags ID obtained by \ref osEventFlagsNew.
|
|
|
/// \return current event flags.
|
|
|
-int32_t osEventFlagsGet (osEventFlagsId_t ef_id);
|
|
|
+uint32_t osEventFlagsGet (osEventFlagsId_t ef_id);
|
|
|
|
|
|
/// Wait for one or more Event Flags to become signaled.
|
|
|
/// \param[in] ef_id event flags ID obtained by \ref osEventFlagsNew.
|
|
|
/// \param[in] flags specifies the flags to wait for.
|
|
|
/// \param[in] options specifies flags options (osFlagsXxxx).
|
|
|
/// \param[in] timeout \ref CMSIS_RTOS_TimeOutValue or 0 in case of no time-out.
|
|
|
-/// \return event flags before clearing or error code if negative.
|
|
|
-int32_t osEventFlagsWait (osEventFlagsId_t ef_id, int32_t flags, uint32_t options, uint32_t timeout);
|
|
|
+/// \return event flags before clearing or error code if highest bit set.
|
|
|
+uint32_t osEventFlagsWait (osEventFlagsId_t ef_id, uint32_t flags, uint32_t options, uint32_t timeout);
|
|
|
|
|
|
/// Delete an Event Flags object.
|
|
|
/// \param[in] ef_id event flags ID obtained by \ref osEventFlagsNew.
|