CMSIS-RTOS2: Flags Functions Error Codes

| CMSIS-RTOS2 Version 2.1.1 Real-Time Operating System: API and RTX Reference Implementation

- Main Page
- Usage and Description
- Reference

All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros
Flags Functions Error Codes
Definitions

Constants used by Thread Flags and Event Flags to return error codes. More...

## Macros
#define | osFlagsErrorUnknown 0xFFFFFFFFU
| osError (-1). More...
#define | osFlagsErrorTimeout 0xFFFFFFFEU
| osErrorTimeout (-2). More...
#define | osFlagsErrorResource 0xFFFFFFFDU
| osErrorResource (-3). More...
#define | osFlagsErrorParameter 0xFFFFFFFCU
| osErrorParameter (-4). More...
#define | osFlagsErrorISR 0xFFFFFFFAU
| osErrorISR (-6). More...

## Description

In case of an error, flags functions (Thread Flags and Event Flags) 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.

## Macro Definition Documentation

#define osFlagsErrorUnknown 0xFFFFFFFFU

Generic error. It is returned when no other error can be applied.

Reference:

- osThreadFlagsSet
- osThreadFlagsClear
- osThreadFlagsWait
- osEventFlagsSet
- osEventFlagsClear
- osEventFlagsWait

#define osFlagsErrorTimeout 0xFFFFFFFEU

This error is returned if a timeout was specified and the specified flags were not set, when the timeout occurred.

Reference:

- osThreadFlagsSet
- osThreadFlagsClear
- osThreadFlagsWait
- osEventFlagsSet
- osEventFlagsClear
- osEventFlagsWait

#define osFlagsErrorResource 0xFFFFFFFDU

This error is returned when you try to get a flag that was not set and timeout 0 was specified. Is also returned when the specified object identifier is corrupt or invalid.

Reference:

- osThreadFlagsSet
- osThreadFlagsClear
- osThreadFlagsWait
- osEventFlagsSet
- osEventFlagsClear
- osEventFlagsWait

#define osFlagsErrorParameter 0xFFFFFFFCU

This error is returned when a given parameter is wrong.

Reference:

- osThreadFlagsSet
- osThreadFlagsClear
- osThreadFlagsWait
- osEventFlagsSet
- osEventFlagsClear
- osEventFlagsWait

#define osFlagsErrorISR 0xFFFFFFFAU

This error is returned when a non-ISR-callable function was called from an ISR.

Reference:

- osThreadFlagsSet
- osThreadFlagsClear
- osThreadFlagsWait
- osEventFlagsSet
- osEventFlagsClear
- osEventFlagsWait