CMSIS-RTOS2: Event Flags Functions

| CMSIS-RTOS2 Version 2.1.3 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
Functions
Event Flags Functions
Event functions

Events generated by event flag functions. More...

## Functions
void | EvrRtxEventFlagsError (osEventFlagsId_t ef_id, int32_t status)
| Event on event flags error (Error) More...
void | EvrRtxEventFlagsNew (const osEventFlagsAttr_t *attr)
| Event on event flags create and initialize (API) More...
void | EvrRtxEventFlagsCreated (osEventFlagsId_t ef_id, const char *name)
| Event on successful event flags create (Op) More...
void | EvrRtxEventFlagsGetName (osEventFlagsId_t ef_id, const char *name)
| Event on event flags name retrieve (API) More...
void | EvrRtxEventFlagsSet (osEventFlagsId_t ef_id, uint32_t flags)
| Event on event flags set (API) More...
void | EvrRtxEventFlagsSetDone (osEventFlagsId_t ef_id, uint32_t event_flags)
| Event on successful event flags set (Op) More...
void | EvrRtxEventFlagsClear (osEventFlagsId_t ef_id, uint32_t flags)
| Event on event flags clear (API) More...
void | EvrRtxEventFlagsClearDone (osEventFlagsId_t ef_id, uint32_t event_flags)
| Event on successful event flags clear (Op) More...
void | EvrRtxEventFlagsGet (osEventFlagsId_t ef_id, uint32_t event_flags)
| Event on event flags retrieve (API) More...
void | EvrRtxEventFlagsWait (osEventFlagsId_t ef_id, uint32_t flags, uint32_t options, uint32_t timeout)
| Event on wait for event flags (API) More...
void | EvrRtxEventFlagsWaitPending (osEventFlagsId_t ef_id, uint32_t flags, uint32_t options, uint32_t timeout)
| Event on pending wait for event flags (Op) More...
void | EvrRtxEventFlagsWaitTimeout (osEventFlagsId_t ef_id)
| Event on wait timeout for event flags (Op) More...
void | EvrRtxEventFlagsWaitCompleted (osEventFlagsId_t ef_id, uint32_t flags, uint32_t options, uint32_t event_flags)
| Event on successful wait for event flags (Op) More...
void | EvrRtxEventFlagsWaitNotCompleted (osEventFlagsId_t ef_id, uint32_t flags, uint32_t options)
| Event on unsuccessful wait for event flags (Op) More...
void | EvrRtxEventFlagsDelete (osEventFlagsId_t ef_id)
| Event on event flags delete (API) More...
void | EvrRtxEventFlagsDestroyed (osEventFlagsId_t ef_id)
| Event on successful event flags delete (Op) More...

## Description

## Function Documentation

void EvrRtxEventFlagsError | ( | osEventFlagsId_t | ef_id,
|  | int32_t | status
| ) |  |

Parameters

  [in] | ef_id | event flags ID obtained by osEventFlagsNew or NULL when ID is unknown.
  [in] | status | extended execution status.

The event EventFlagsError is generated when Event Flags routines complete their execution due to an error.

The status parameter indicates the execution status and can be one of the osStatus_t codes or one of the extended execution status codes which are summarized in the table below.

Extended Status Code | Description
--- | ---
osRtxErrorKernelNotReady | Kernel scheduler is not in Ready state.
osRtxErrorKernelNotRunning | Kernel scheduler is not executing - there is no running thread.
osRtxErrorInvalidControlBlock | Object control block with invalid alignment or size was specified.
osRtxErrorInvalidDataMemory | Object data memory with invalid alignment or size was specified.
osRtxErrorInvalidThreadStack | Thread stack memory with invalid alignment or size was specified.
osRtxErrorInvalidPriority | Invalid thread priority was specified.
osRtxErrorThreadNotJoinable | Specified thread is not joinable.
osRtxErrorMutexNotOwned | Specified mutex is not owned by the current running thread.
osRtxErrorMutexNotLocked | Specified mutex is not locked.
osRtxErrorMutexLockLimit | Maximum number of recursive mutex locks reached.
osRtxErrorSemaphoreCountLimit | Semaphore count limit reached.
osRtxErrorTZ_InitContext_S | Secure context memory system initialization failed.
osRtxErrorTZ_AllocContext_S | Secure context memory allocation failed.
osRtxErrorTZ_FreeContext_S | Secure context memory deallocation failed.
osRtxErrorTZ_LoadContext_S | Secure context load failed.
osRtxErrorTZ_SaveContext_S | Secure context save failed.

Value in the Event Recorder shows:

- ef_id : event flags ID.
- status : execution status code.

void EvrRtxEventFlagsNew | ( | const osEventFlagsAttr_t * | attr | ) |

Parameters

  [in] | attr | event flags attributes.

The event EventFlagsNew is generated when the function osEventFlagsNew is called.

Value in the Event Recorder shows:

- attr : memory address of Event Flags attributes or 0 when they are not specified.

void EvrRtxEventFlagsCreated | ( | osEventFlagsId_t | ef_id,
|  | const char * | name
| ) |  |

Parameters

  [in] | ef_id | event flags ID obtained by osEventFlagsNew.
  [in] | name | pointer to event flags object name.

The event EventFlagsCreated is generated when the function osEventFlagsNew successfully creates a event flags object.

Value in the Event Recorder shows:

- ef_id : event flags ID.

void EvrRtxEventFlagsGetName | ( | osEventFlagsId_t | ef_id,
|  | const char * | name
| ) |  |

Parameters

  [in] | ef_id | event flags ID obtained by osEventFlagsNew.
  [in] | name | pointer to event flags object name.

The event EventFlagsGetName is generated when the function osEventFlagsGetName is called and its execution result is known.

Value in the Event Recorder shows:

- ef_id : event flags ID.
- name : retrieved memory address of name string (0 in case of a failure).

void EvrRtxEventFlagsSet | ( | osEventFlagsId_t | ef_id,
|  | uint32_t | flags
| ) |  |

Parameters

  [in] | ef_id | event flags ID obtained by osEventFlagsNew.
  [in] | flags | flags that shall be set.

The event EventFlagsSet is generated when the function osEventFlagsSet is called.

Value in the Event Recorder shows:

- ef_id : event flags ID.
- flags : flags that shall be set.

void EvrRtxEventFlagsSetDone | ( | osEventFlagsId_t | ef_id,
|  | uint32_t | event_flags
| ) |  |

Parameters

  [in] | ef_id | event flags ID obtained by osEventFlagsNew.
  [in] | event_flags | event flags after setting.

The event EventFlagsSetDone is generated when event flags are successfully set.

Value in the Event Recorder shows:

- ef_id : event flags ID.
- event_flags : event flags after setting.

void EvrRtxEventFlagsClear | ( | osEventFlagsId_t | ef_id,
|  | uint32_t | flags
| ) |  |

Parameters

  [in] | ef_id | event flags ID obtained by osEventFlagsNew.
  [in] | flags | flags that shall be cleared.

The event EventFlagsClear is generated when the function osEventFlagsClear is called.

Value in the Event Recorder shows:

- ef_id : event flags ID.
- flags : flags that shall be cleared.

void EvrRtxEventFlagsClearDone | ( | osEventFlagsId_t | ef_id,
|  | uint32_t | event_flags
| ) |  |

Parameters

  [in] | ef_id | event flags ID obtained by osEventFlagsNew.
  [in] | event_flags | event flags before clearing.

The event EventFlagsClearDone is generated when the function osEventFlagsClear successfully clears the event flags.

Value in the Event Recorder shows:

- ef_id : event flags ID.
- event_flags : event flags before clearing.

void EvrRtxEventFlagsGet | ( | osEventFlagsId_t | ef_id,
|  | uint32_t | event_flags
| ) |  |

Parameters

  [in] | ef_id | event flags ID obtained by osEventFlagsNew.
  [in] | event_flags | current event flags.

The event EventFlagsGet is generated when the function osEventFlagsGet is called and its execution result is known.

Value in the Event Recorder shows:

- ef_id : event flags ID.
- event_flags : retrieved current event flags.

void EvrRtxEventFlagsWait | ( | osEventFlagsId_t | ef_id,
|  | uint32_t | flags,
|  | uint32_t | options,
|  | uint32_t | timeout
| ) |  |

Parameters

  [in] | ef_id | event flags ID obtained by osEventFlagsNew.
  [in] | flags | flags to wait for.
  [in] | options | flags options (osFlagsXxxx).
  [in] | timeout | Timeout Value or 0 in case of no time-out.

The event EventFlagsWait is generated when the function osEventFlagsWait is called.

Value in the Event Recorder shows:

- ef_id : event flags ID.
- flags : flags to wait for.
- options : flags options (refer to event flags options).
- timeout : Timeout Value.

void EvrRtxEventFlagsWaitPending | ( | osEventFlagsId_t | ef_id,
|  | uint32_t | flags,
|  | uint32_t | options,
|  | uint32_t | timeout
| ) |  |

Parameters

  [in] | ef_id | event flags ID obtained by osEventFlagsNew.
  [in] | flags | flags to wait for.
  [in] | options | flags options (osFlagsXxxx).
  [in] | timeout | Timeout Value or 0 in case of no time-out.

The event EventFlagsWaitPending is generated when the function osEventFlagsWait starts waiting for event flags to become signaled.

Value in the Event Recorder shows:

- ef_id : event flags ID.
- flags : flags to wait for.
- options : flags options (refer to event flags options).
- timeout : Timeout Value.

void EvrRtxEventFlagsWaitTimeout | ( | osEventFlagsId_t | ef_id | ) |

Parameters

  [in] | ef_id | event flags ID obtained by osEventFlagsNew.

The event EventFlagsWaitTimeout is generated when wait for event flags to become signaled is aborted due to expired wait timeout.

Value in the Event Recorder shows:

- ef_id : event flags ID.

void EvrRtxEventFlagsWaitCompleted | ( | osEventFlagsId_t | ef_id,
|  | uint32_t | flags,
|  | uint32_t | options,
|  | uint32_t | event_flags
| ) |  |

Parameters

  [in] | ef_id | event flags ID obtained by osEventFlagsNew.
  [in] | flags | flags to wait for.
  [in] | options | flags options (osFlagsXxxx).
  [in] | event_flags | event flags before clearing or 0 if specified flags have not been set.

The event EventFlagsWaitCompleted is generated when waiting for event flags ends because requested flags were signaled.

Value in the Event Recorder shows:

- ef_id : event flags ID.
- flags : flags to wait for.
- options : flags option (refer to event flags options).
- event_flags : event flags before clearing or 0 if specified flags have not been set.

void EvrRtxEventFlagsWaitNotCompleted | ( | osEventFlagsId_t | ef_id,
|  | uint32_t | flags,
|  | uint32_t | options
| ) |  |

Parameters

  [in] | ef_id | event flags ID obtained by osEventFlagsNew.
  [in] | flags | flags to wait for.
  [in] | options | flags options (osFlagsXxxx).

The event EventFlagsWaitNotCompleted is generated when the function osEventFlagsWait returns without timeout and specified event flags were not signaled.

Value in the Event Recorder shows:

- ef_id : event flags ID.
- flags : flags to wait for.
- options : flags options (refer to event flags options).

void EvrRtxEventFlagsDelete | ( | osEventFlagsId_t | ef_id | ) |

Parameters

  [in] | ef_id | event flags ID obtained by osEventFlagsNew.

The event EventFlagsDelete is generated when the function osEventFlagsDelete is called.

Value in the Event Recorder shows:

- ef_id : event flags ID.

void EvrRtxEventFlagsDestroyed | ( | osEventFlagsId_t | ef_id | ) |

Parameters

  [in] | ef_id | event flags ID obtained by osEventFlagsNew.

The event EventFlagsDestroyed is generated when the function osEventFlagsDelete successfully deletes the event flags object.

Value in the Event Recorder shows:

- ef_id : event flags ID.