From 9f95ff5b6ba01db09552b84a0ab79607060a2666 Mon Sep 17 00:00:00 2001 From: Ali Labbene Date: Wed, 11 Dec 2019 08:59:21 +0100 Subject: Official ARM version: v5.4.0 Add CMSIS V5.4.0, please refer to index.html available under \docs folder. Note: content of \CMSIS\Core\Include has been copied under \Include to keep the same structure used in existing projects, and thus avoid projects mass update Note: the following components have been removed from ARM original delivery (as not used in ST packages) - CMSIS_EW2018.pdf - .gitattributes - .gitignore - \Device - \CMSIS - \CoreValidation - \DAP - \Documentation - \DoxyGen - \Driver - \Pack - \RTOS\CMSIS_RTOS_Tutorial.pdf - \RTOS\RTX - \RTOS\Template - \RTOS2\RTX - \Utilities - All ARM/GCC projects files are deleted from \DSP, \RTOS and \RTOS2 Change-Id: Ia026c3f0f0d016627a4fb5a9032852c33d24b4d3 --- docs/RTOS2/html/group__CMSIS__RTOS__Wait.html | 234 ++++++++++++++++++++++++++ 1 file changed, 234 insertions(+) create mode 100644 docs/RTOS2/html/group__CMSIS__RTOS__Wait.html (limited to 'docs/RTOS2/html/group__CMSIS__RTOS__Wait.html') diff --git a/docs/RTOS2/html/group__CMSIS__RTOS__Wait.html b/docs/RTOS2/html/group__CMSIS__RTOS__Wait.html new file mode 100644 index 0000000..e9cd3e5 --- /dev/null +++ b/docs/RTOS2/html/group__CMSIS__RTOS__Wait.html @@ -0,0 +1,234 @@ + + + + + +Generic Wait Functions +CMSIS-RTOS2: Generic Wait Functions + + + + + + + + + + + + + + +
+
+ + + + + + + +
+
CMSIS-RTOS2 +  Version 2.1.3 +
+
Real-Time Operating System: API and RTX Reference Implementation
+
+
+ +
+
    + +
+
+ + + +
+
+ +
+
+
+ +
+ + + + +
+ +
+ +
+ +
+
Generic Wait Functions
+
+
+ +

Wait for a certain period of time. +More...

+ + + + + + + + +

+Functions

osStatus_t osDelay (uint32_t ticks)
 Wait for Timeout (Time Delay). More...
 
osStatus_t osDelayUntil (uint32_t ticks)
 Wait until specified time. More...
 
+

Description

+

The generic wait functions provide means for a time delay.

+
Note
Generic wait functions cannot be called from Interrupt Service Routines.
+

Function Documentation

+ +
+
+ + + + + + + + +
osStatus_t osDelay (uint32_t ticks)
+
+
Parameters
+ + +
[in]tickstime ticks value
+
+
+
Returns
status code that indicates the execution status of the function.
+

The function osDelay waits for a time period specified in kernel ticks. For a value of 1 the system waits until the next timer tick occurs. The actual time delay may be up to one timer tick less than specified, i.e. calling osDelay(1) right before the next system tick occurs the thread is rescheduled immediately.

+

The delayed thread is put into the BLOCKED state and a context switch occurs immediately. The thread is automatically put back to the READY state after the given amount of ticks has elapsed. If the thread will have the highest priority in READY state it will being scheduled immediately.

+

Possible osStatus_t return values:

+ +
Note
This function cannot be called from Interrupt Service Routines.
+

Code Example

+
#include "cmsis_os2.h"
+
+
void Thread_1 (void *arg) { // Thread function
+
osStatus_t status; // capture the return status
+
uint32_t delayTime; // delay time in milliseconds
+
+
delayTime = 1000; // delay 1 second
+
status = osDelay (delayTime); // suspend thread execution
+
}
+
+
+
+ +
+
+ + + + + + + + +
osStatus_t osDelayUntil (uint32_t ticks)
+
+
Parameters
+ + +
[in]ticksabsolute time in ticks
+
+
+
Returns
status code that indicates the execution status of the function.
+

The function osDelayUntil waits until an absolute time (specified in kernel ticks) is reached.

+

The corner case when the kernel tick counter overflows is handled by osDelayUntil. Thus it is absolutely legal to provide a value which is lower than the current tick value, i.e. returned by osKernelGetTickCount. Typically as a user you do not have to take care about the overflow. The only limitation you have to have in mind is that the maximum delay is limited to (231)-1 ticks.

+

The delayed thread is put into the BLOCKED state and a context switch occurs immediately. The thread is automatically put back to the READY state when the given time is reached. If the thread will have the highest priority in READY state it will being scheduled immediately.

+

Possible osStatus_t return values:

+ +
Note
This function cannot be called from Interrupt Service Routines.
+

Code Example

+
#include "cmsis_os2.h"
+
+
void Thread_1 (void *arg) { // Thread function
+
uint32_t tick;
+
+
tick = osKernelGetTickCount(); // retrieve the number of system ticks
+
for (;;) {
+
tick += 1000; // delay 1000 ticks periodically
+
osDelayUntil(tick);
+
// ...
+
}
+
}
+
+
+
+
+
+ + + + -- cgit