| CMSIS-RTOS2 Real-Time Operating System API |

Loading...
Searching...
No Matches
Macros
Flags Functions Error Codes
CMSIS-RTOS2 API » Generic Definitions

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

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

## Description

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

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

## ◆ osFlagsErrorUnknown

#define osFlagsErrorUnknown 0xFFFFFFFFU

osError (-1).

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

Reference:

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

## ◆ osFlagsErrorTimeout

#define osFlagsErrorTimeout 0xFFFFFFFEU

osErrorTimeout (-2).

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

## ◆ osFlagsErrorResource

#define osFlagsErrorResource 0xFFFFFFFDU

osErrorResource (-3).

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

## ◆ osFlagsErrorParameter

#define osFlagsErrorParameter 0xFFFFFFFCU

osErrorParameter (-4).

This error is returned when a given parameter is wrong.

Reference:

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

## ◆ osFlagsErrorISR

#define osFlagsErrorISR 0xFFFFFFFAU

osErrorISR (-6).

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

Reference:

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