From 96d6da4e252b06dcfdc041e7df23e86161c33007 Mon Sep 17 00:00:00 2001 From: rihab kouki Date: Tue, 28 Jul 2020 11:24:49 +0100 Subject: Official ARM version: v5.6.0 --- .../html/group__CMSIS__RTOS__ThreadFlagsMgmt.html | 39 +++++++++++----------- 1 file changed, 19 insertions(+), 20 deletions(-) (limited to 'docs/RTOS2/html/group__CMSIS__RTOS__ThreadFlagsMgmt.html') diff --git a/docs/RTOS2/html/group__CMSIS__RTOS__ThreadFlagsMgmt.html b/docs/RTOS2/html/group__CMSIS__RTOS__ThreadFlagsMgmt.html index 5c25af2..03f3622 100644 --- a/docs/RTOS2/html/group__CMSIS__RTOS__ThreadFlagsMgmt.html +++ b/docs/RTOS2/html/group__CMSIS__RTOS__ThreadFlagsMgmt.html @@ -212,9 +212,9 @@ Functions

The function osThreadFlagsSet sets the thread flags for a thread specified by parameter thread_id. It returns the flags set, or an error code if highest bit is set (refer to Flags Functions Error Codes). This function may be used also within interrupt service routines. Threads waiting for a flag to be set will resume from BLOCKED state.

Possible Flags Functions Error Codes return values:

Note
This function may be called from Interrupt Service Routines.

Code Example

@@ -222,12 +222,12 @@ Functions
* Function 'signal_func' called from multiple threads
*---------------------------------------------------------------------------*/
void signal_func (osThreadId_t tid) {
-
osThreadFlagsSet(tid_clock, 0x0100); /* set signal to clock thread */
-
osDelay(500); /* delay 500ms */
-
osThreadFlagsSet(tid_clock, 0x0100); /* set signal to clock thread */
-
osDelay(500); /* delay 500ms */
-
osThreadFlagsSet(tid, 0x0001); /* set signal to thread 'thread' */
-
osDelay(500); /* delay 500ms */
+
osThreadFlagsSet(tid_clock, 0x0100U); /* set signal to clock thread */
+
osDelay(500U); /* delay 500ms */
+
osThreadFlagsSet(tid_clock, 0x0100U); /* set signal to clock thread */
+
osDelay(500U); /* delay 500ms */
+
osThreadFlagsSet(tid, 0x0001U); /* set signal to thread 'thread' */
+
osDelay(500U); /* delay 500ms */
}
@@ -255,9 +255,8 @@ Functions

The function osThreadFlagsClear clears the specified flags for the currently running thread. It returns the flags before clearing, or an error code if highest bit is set (refer to Flags Functions Error Codes).

Possible Flags Functions Error Codes return values:

Note
This function cannot be called from Interrupt Service Routines.
@@ -337,9 +336,9 @@ Functions

The function returns the flags before clearing, or an error code if highest bit is set (refer to Flags Functions Error Codes).

Possible Flags Functions Error Codes return values:

Note
This function cannot be called from Interrupt Service Routines.
@@ -348,13 +347,13 @@ Functions
void Thread (void* arg) {
;
-
osThreadFlagsWait (0x00000001U, osFlagsWaitAny, osWaitForever); // Wait forever until thread flag 1 is set.
+
osThreadFlagsWait(0x00000001U, osFlagsWaitAny, osWaitForever); // Wait forever until thread flag 1 is set.
;
-
osThreadFlagsWait (0x00000003U, osFlagsWaitAny, osWaitForever); // Wait forever until either thread flag 0 or 1 is set.
+
osThreadFlagsWait(0x00000003U, osFlagsWaitAny, osWaitForever); // Wait forever until either thread flag 0 or 1 is set.
;
-
osThreadFlagsWait (0x00000003U, osFlagsWaitAll, 10); // Wait for 10 timer ticks until thread flags 0 and 1 are set. Timeout afterwards.
+
osThreadFlagsWait(0x00000003U, osFlagsWaitAll, 10U); // Wait for 10 timer ticks until thread flags 0 and 1 are set. Timeout afterwards.
;
-
osThreadFlagsWait (0x00000003U, osFlagsWaitAll | osFlagsNoClear, osWaitForever); // Same as the above, but the flags will not be cleared.
+
osThreadFlagsWait(0x00000003U, osFlagsWaitAll | osFlagsNoClear, osWaitForever); // Same as the above, but the flags will not be cleared.
}
@@ -364,7 +363,7 @@ Functions