APIs for acquiring and working with Events.
cy_rslt_t | cy_rtos_event_init (cy_event_t *event) |
Create an event. More... | |
cy_rslt_t | cy_rtos_event_setbits (cy_event_t *event, uint32_t bits) |
Set the event flag bits. More... | |
cy_rslt_t | cy_rtos_event_clearbits (cy_event_t *event, uint32_t bits) |
Clear the event flag bits. More... | |
cy_rslt_t | cy_rtos_event_getbits (cy_event_t *event, uint32_t *bits) |
Get the event bits. More... | |
cy_rslt_t | cy_rtos_event_waitbits (cy_event_t *event, uint32_t *bits, bool clear, bool all, cy_time_t timeout_ms) |
Wait for the event and return bits. More... | |
cy_rslt_t | cy_rtos_event_deinit (cy_event_t *event) |
Deinitialize a event. More... | |
#define | cy_rtos_init_event(event) cy_rtos_event_init(event) |
Create an event. More... | |
#define | cy_rtos_setbits_event(event, bits, in_isr) cy_rtos_event_setbits(event, bits) |
Set the event flag bits. More... | |
#define | cy_rtos_clearbits_event(event, bits, in_isr) cy_rtos_event_clearbits(event, bits) |
Clear the event flag bits. More... | |
#define | cy_rtos_getbits_event(event, bits) cy_rtos_event_getbits(event, bits) |
Get the event bits. More... | |
#define | cy_rtos_waitbits_event(event, bits, clear, all, timeout_ms) cy_rtos_event_waitbits(event, bits, clear, all, timeout_ms) |
Wait for the event and return bits. More... | |
#define | cy_rtos_deinit_event(event) cy_rtos_event_deinit(event) |
Deinitialize a event. More... | |
#define cy_rtos_init_event | ( | event | ) | cy_rtos_event_init(event) |
Create an event.
This is an event which can be used to signal a set of threads with a 32 bit data element.
[in,out] | event | Pointer to the event handle to be initialized |
#define cy_rtos_setbits_event | ( | event, | |
bits, | |||
in_isr | |||
) | cy_rtos_event_setbits(event, 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
[in] | event | Pointer to the event handle |
[in] | bits | The value of the 32 bit flags |
[in] | in_isr | If true, this is called from an ISR, otherwise from a thread |
#define cy_rtos_clearbits_event | ( | event, | |
bits, | |||
in_isr | |||
) | cy_rtos_event_clearbits(event, bits) |
Clear the event flag bits.
This function clears bits in the event.
[in] | event | Pointer to the event handle |
[in] | bits | Any bits set in this value, will be cleared in the event. |
[in] | in_isr | if true, this is called from an ISR, otherwise from a thread |
#define cy_rtos_getbits_event | ( | event, | |
bits | |||
) | cy_rtos_event_getbits(event, bits) |
Get the event bits.
Returns the current bits for the event.
[in] | event | Pointer to the event handle |
[out] | bits | pointer to receive the value of the event flags |
#define cy_rtos_waitbits_event | ( | event, | |
bits, | |||
clear, | |||
all, | |||
timeout_ms | |||
) | cy_rtos_event_waitbits(event, bits, clear, all, 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.
[in] | event | Pointer to the event handle |
[in,out] | bits | pointer to receive the value of the event flags |
[in] | clear | if true, clear any bits set that cause the wait to return if false, do not clear bits |
[in] | all | if 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_ms | The amount of time to wait in milliseconds |
#define cy_rtos_deinit_event | ( | event | ) | cy_rtos_event_deinit(event) |
Deinitialize a event.
This function frees the resources associated with an event.
[in] | event | Pointer to the event handle |
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.
[in,out] | event | Pointer to the event handle to be initialized |
cy_rslt_t cy_rtos_event_setbits | ( | 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
[in] | event | Pointer to the event handle |
[in] | bits | The value of the 32 bit flags |
cy_rslt_t cy_rtos_event_clearbits | ( | cy_event_t * | event, |
uint32_t | bits | ||
) |
Clear the event flag bits.
This function clears bits in the event.
[in] | event | Pointer to the event handle |
[in] | bits | Any bits set in this value, will be cleared in the event. |
cy_rslt_t cy_rtos_event_getbits | ( | cy_event_t * | event, |
uint32_t * | bits | ||
) |
Get the event bits.
Returns the current bits for the event.
[in] | event | Pointer to the event handle |
[out] | bits | pointer to receive the value of the event flags |
cy_rslt_t cy_rtos_event_waitbits | ( | 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.
[in] | event | Pointer to the event handle |
[in,out] | bits | pointer to receive the value of the event flags |
[in] | clear | if true, clear any bits set that cause the wait to return if false, do not clear bits |
[in] | all | if 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_ms | The amount of time to wait in milliseconds |
cy_rslt_t cy_rtos_event_deinit | ( | cy_event_t * | event | ) |
Deinitialize a event.
This function frees the resources associated with an event.
[in] | event | Pointer to the event handle |