| CMSIS-RTOS Version 1.00 CMSIS-RTOS API: Generic RTOS interface for Cortex-M processor-based devices.

- CMSIS
- CORE
- DSP
- RTOS API
- SVD

- Main Page
- Usage and Description
- Reference

Defines | Functions
Generic Wait Functions
CMSIS-RTOS API

Wait for a time period or unspecified events. More...

## Defines

#define | osFeature_Wait 1
| osWait function: 1=available, 0=not available

## Functions

osStatus | osDelay (uint32_t millisec)
| Wait for Timeout (Time Delay)
osEvent | osWait (uint32_t millisec)
| Wait for Signal, Message, Mail, or Timeout.

## Description

The Generic Wait function group provides means for a time delay and allow to wait for unspecified events.

## Define Documentation

#define osFeature_Wait 1

A CMSIS-RTOS implementation may support the generic wait function osWait. When the value osFeature_Wait is 1 a generic wait function osWait is available. When the value osFeature_Wait is 0 no generic wait function osWait is available.

## Function Documentation

osStatus osDelay | ( | uint32_t | millisec | ) |

Parameters:

  [in] | millisec | time delay value

Returns:
  status code that indicates the execution status of the function.

Wait for a specified time period in millisec.

Status and Error Codes

- osEventTimeout: the time delay is executed.
- osErrorISR: osDelay cannot be called from interrupt service routines.

osStatus osWait | ( | uint32_t | millisec | ) |

Parameters:

  [in] | millisec | timeout value or 0 in case of no time-out

Returns:
  event that contains signal, message, or mail information or error code.

Note:
  MUST REMAIN UNCHANGED: osWait shall be consistent in every CMSIS-RTOS.

Wait for any event of the type Signal, Message, Mail for a specified time period in millisec. When millisec is set to osWaitForever the function will wait for an infinite time until a event occurs.

Note:
  this function is optionally and may not be provided by all CMSIS-RTOS implementations.

Status and Error Codes

- osEventSignal: a signal event occurred and is returned.
- osEventMessage: a message event occurred and is returned.
- osEventMail: a mail event occurred and is returned.
- osEventTimeout: the time delay is executed.
- osErrorISR: osDelay cannot be called from interrupt service routines.