Abstraction RTOS
Loading...
Searching...
No Matches
Events

General Description

APIs for acquiring and working with Events.

cy_rslt_t cy_rtos_event_init (cy_event_t *event)
 Create an event.
cy_rslt_t cy_rtos_event_setbits (const cy_event_t *event, uint32_t bits)
 Set the event flag bits.
cy_rslt_t cy_rtos_event_clearbits (const cy_event_t *event, uint32_t bits)
 Clear the event flag bits.
cy_rslt_t cy_rtos_event_getbits (const cy_event_t *event, uint32_t *bits)
 Get the event bits.
cy_rslt_t cy_rtos_event_waitbits (const cy_event_t *event, uint32_t *bits, bool clear, bool all, cy_time_t timeout_ms)
 Wait for the event and return bits.
cy_rslt_t cy_rtos_event_deinit (cy_event_t *event)
 Deinitialize a event.
#define cy_rtos_init_event(event)
 Create an event.
#define cy_rtos_setbits_event(event, bits, in_isr)
 Set the event flag bits.
#define cy_rtos_clearbits_event(event, bits, in_isr)
 Clear the event flag bits.
#define cy_rtos_getbits_event(event, bits)
 Get the event bits.
#define cy_rtos_waitbits_event(event, bits, clear, all, timeout_ms)
 Wait for the event and return bits.
#define cy_rtos_deinit_event(event)
 Deinitialize a event.

Macro Definition Documentation

◆ cy_rtos_init_event

#define cy_rtos_init_event ( event)
Value:
cy_rslt_t cy_rtos_event_init(cy_event_t *event)
Create an event.

Create an event.

This is an event which can be used to signal a set of threads with a 32 bit data element.

Parameters
[in,out]eventPointer to the event handle to be initialized
Returns
The status of the event initialization request. Same across all RTOS kernels [CY_RSLT_SUCCESS, CY_RTOS_BAD_PARAM].
Specific for kernel:

◆ cy_rtos_setbits_event

#define cy_rtos_setbits_event ( event,
bits,
in_isr )
Value:
cy_rslt_t cy_rtos_event_setbits(const cy_event_t *event, uint32_t bits)
Set the event flag bits.

Set the event flag bits.

This is an event which can be used to signal a set of threads with a 32 bit data element. Any threads waiting on this event are released

Parameters
[in]eventPointer to the event handle
[in]bitsThe value of the 32 bit flags
[in]in_isrIf true, this is called from an ISR, otherwise from a thread
Returns
The status of the set request. Same across all RTOS kernels [CY_RSLT_SUCCESS, CY_RTOS_BAD_PARAM, CY_RTOS_GENERAL_ERROR].
Specific for kernel:

◆ cy_rtos_clearbits_event

#define cy_rtos_clearbits_event ( event,
bits,
in_isr )
Value:
cy_rslt_t cy_rtos_event_clearbits(const cy_event_t *event, uint32_t bits)
Clear the event flag bits.

Clear the event flag bits.

This function clears bits in the event.

Parameters
[in]eventPointer to the event handle
[in]bitsAny bits set in this value, will be cleared in the event.
[in]in_isrif true, this is called from an ISR, otherwise from a thread
Returns
The status of the clear flags request. Same across all RTOS kernels [CY_RSLT_SUCCESS, CY_RTOS_BAD_PARAM, CY_RTOS_GENERAL_ERROR].
Specific for kernel:

◆ cy_rtos_getbits_event

#define cy_rtos_getbits_event ( event,
bits )
Value:
cy_rslt_t cy_rtos_event_getbits(const cy_event_t *event, uint32_t *bits)
Get the event bits.

Get the event bits.

Returns the current bits for the event.

Parameters
[in]eventPointer to the event handle
[out]bitspointer to receive the value of the event flags
Returns
The status of the get request. Same across all RTOS kernels [CY_RSLT_SUCCESS, CY_RTOS_BAD_PARAM].
Specific for kernel:

◆ cy_rtos_waitbits_event

#define cy_rtos_waitbits_event ( event,
bits,
clear,
all,
timeout_ms )
Value:
cy_rtos_event_waitbits(event, bits, clear, all, timeout_ms)
cy_rslt_t cy_rtos_event_waitbits(const cy_event_t *event, uint32_t *bits, bool clear, bool all, cy_time_t timeout_ms)
Wait for the event and return bits.

Wait for the event and return bits.

Waits for the event to be set and then returns the bits associated with the event, or waits for the given timeout period.

Note
This function returns if any bit in the set is set.
Parameters
[in]eventPointer to the event handle
[in,out]bitspointer to receive the value of the event flags
[in]clearif true, clear any bits set that cause the wait to return if false, do not clear bits
[in]allif true, all bits in the initial bits value must be set to return if false, any one bit in the initial bits value must be set to return
[in]timeout_msThe amount of time to wait in milliseconds
Returns
The status of the wait for event request. Same across all RTOS kernels [CY_RSLT_SUCCESS, CY_RTOS_BAD_PARAM, CY_RTOS_TIMEOUT].
Specific for kernel:

◆ cy_rtos_deinit_event

#define cy_rtos_deinit_event ( event)
Value:
cy_rslt_t cy_rtos_event_deinit(cy_event_t *event)
Deinitialize a event.

Deinitialize a event.

This function frees the resources associated with an event.

Parameters
[in]eventPointer to the event handle
Returns
The status of the deletion request. Same across all RTOS kernels [CY_RSLT_SUCCESS, CY_RTOS_BAD_PARAM].
Specific for kernel:

Function Documentation

◆ cy_rtos_event_init()

cy_rslt_t cy_rtos_event_init ( cy_event_t * event)

Create an event.

This is an event which can be used to signal a set of threads with a 32 bit data element.

Parameters
[in,out]eventPointer to the event handle to be initialized
Returns
The status of the event initialization request. Same across all RTOS kernels [CY_RSLT_SUCCESS, CY_RTOS_BAD_PARAM].
Specific for kernel:

◆ cy_rtos_event_setbits()

cy_rslt_t cy_rtos_event_setbits ( const cy_event_t * event,
uint32_t bits )

Set the event flag bits.

This is an event which can be used to signal a set of threads with a 32 bit data element. Any threads waiting on this event are released

Parameters
[in]eventPointer to the event handle
[in]bitsThe value of the 32 bit flags
Returns
The status of the set request. Same across all RTOS kernels [CY_RSLT_SUCCESS, CY_RTOS_BAD_PARAM, CY_RTOS_GENERAL_ERROR].
Specific for kernel:

◆ cy_rtos_event_clearbits()

cy_rslt_t cy_rtos_event_clearbits ( const cy_event_t * event,
uint32_t bits )

Clear the event flag bits.

This function clears bits in the event.

Parameters
[in]eventPointer to the event handle
[in]bitsAny bits set in this value, will be cleared in the event.
Returns
The status of the clear flags request. Same across all RTOS kernels [CY_RSLT_SUCCESS, CY_RTOS_BAD_PARAM, CY_RTOS_GENERAL_ERROR].
Specific for kernel:

◆ cy_rtos_event_getbits()

cy_rslt_t cy_rtos_event_getbits ( const cy_event_t * event,
uint32_t * bits )

Get the event bits.

Returns the current bits for the event.

Parameters
[in]eventPointer to the event handle
[out]bitspointer to receive the value of the event flags
Returns
The status of the get request. Same across all RTOS kernels [CY_RSLT_SUCCESS, CY_RTOS_BAD_PARAM].
Specific for kernel:

◆ cy_rtos_event_waitbits()

cy_rslt_t cy_rtos_event_waitbits ( const cy_event_t * event,
uint32_t * bits,
bool clear,
bool all,
cy_time_t timeout_ms )

Wait for the event and return bits.

Waits for the event to be set and then returns the bits associated with the event, or waits for the given timeout period.

Note
This function returns if any bit in the set is set.
Parameters
[in]eventPointer to the event handle
[in,out]bitspointer to receive the value of the event flags
[in]clearif true, clear any bits set that cause the wait to return if false, do not clear bits
[in]allif true, all bits in the initial bits value must be set to return if false, any one bit in the initial bits value must be set to return
[in]timeout_msThe amount of time to wait in milliseconds
Returns
The status of the wait for event request. Same across all RTOS kernels [CY_RSLT_SUCCESS, CY_RTOS_BAD_PARAM, CY_RTOS_TIMEOUT].
Specific for kernel:

◆ cy_rtos_event_deinit()

cy_rslt_t cy_rtos_event_deinit ( cy_event_t * event)

Deinitialize a event.

This function frees the resources associated with an event.

Parameters
[in]eventPointer to the event handle
Returns
The status of the deletion request. Same across all RTOS kernels [CY_RSLT_SUCCESS, CY_RTOS_BAD_PARAM].
Specific for kernel: