Events

RTOS event flag functions. More...

Functions

gos_result_t gos_rtos_event_flags_init (gos_event_flags_t *event_flags)
Initialize an event flags. More...
gos_result_t gos_rtos_event_flags_deinit (gos_event_flags_t *event_flags)
De-initialise an event flags. More...
gos_result_t gos_rtos_event_flags_wait (gos_event_flags_t *event_flags, uint32_t flags_to_wait_for, uint32_t *flags_set_ptr, bool clear_set_flags, gos_event_flags_wait_option_t wait_option, uint32_t timeout_ms)
Wait for event flags to be set. More...
gos_result_t gos_rtos_event_flags_wait_for_any (gos_event_flags_t *event_flags, uint32_t flags_to_wait_for, uint32_t *flags_set_ptr, uint32_t timeout_ms)
Wait for any event flags to be set. More...
gos_result_t gos_rtos_event_flags_wait_for_all (gos_event_flags_t *event_flags, uint32_t flags_to_wait_for, uint32_t *flags_set_ptr, uint32_t timeout_ms)
Wait for all event flags to be set. More...
gos_result_t gos_rtos_event_flags_set (gos_event_flags_t *event_flags, uint32_t flags_to_set)
Set event flags. More...
gos_result_t gos_rtos_event_flags_clear (gos_event_flags_t *event_flags, uint32_t flags_to_clear)
Clear event flags. More...

Detailed Description

RTOS event flag functions.

Function Documentation

gos_rtos_event_flags_clear()

gos_result_t gos_rtos_event_flags_clear ( gos_event_flags_t * event_flags,
uint32_t flags_to_clear
)

Clear event flags.

Clear the specified event flags.

Parameters
[in] event_flags : Pointer to the event flags handle
[in] flags_to_clear : Group of event flags (ORed bit-fields) to clear
Returns
Result of API call, gos_result_t

gos_rtos_event_flags_deinit()

gos_result_t gos_rtos_event_flags_deinit ( gos_event_flags_t * event_flags )

De-initialise an event flags.

Parameters
[in] event_flags : Pointer to the event flags handle
Returns
Result of API call, gos_result_t

gos_rtos_event_flags_init()

gos_result_t gos_rtos_event_flags_init ( gos_event_flags_t * event_flags )

Initialize an event flags.

Parameters
[in] event_flags : Pointer to the event flags handle
Returns
Result of API call, gos_result_t

gos_rtos_event_flags_set()

gos_result_t gos_rtos_event_flags_set ( gos_event_flags_t * event_flags,
uint32_t flags_to_set
)

Set event flags.

Set the specified event flags.

Parameters
[in] event_flags : Pointer to the event flags handle
[in] flags_to_set : Group of event flags (ORed bit-fields) to set
Returns
Result of API call, gos_result_t

gos_rtos_event_flags_wait()

gos_result_t gos_rtos_event_flags_wait ( gos_event_flags_t * event_flags,
uint32_t flags_to_wait_for,
uint32_t * flags_set_ptr,
bool clear_set_flags,
gos_event_flags_wait_option_t wait_option,
uint32_t timeout_ms
)

Wait for event flags to be set.

This wait for flags_to_wait_for to be set. If wait_option is:

If clear_set_flags is true and this API successfully returns, then the flags in flags_to_wait_for will be cleared. If clear_set_flags is false then the flags will NOT be cleared.

If this successfully returns, flags_set_ptr will contain the flags that were set.

If the necessary flags are not set after timeout_ms then GOS_TIMEOUT is returned.

Parameters
[in] event_flags : Pointer to the event flags handle
[in] flags_to_wait_for : Group of event flags (ORed bit-fields) to wait for
[out] flags_set_ptr : Pointer to hold flags there were successfully set, optional, leave NULL if unused
[in] clear_set_flags : If true then clear the flags in flags_to_wait_for after successfully returning, if false leave flags as-is
[in] wait_option : How to wait for flags, see gos_event_flags_wait_option_t
[in] timeout_ms : Time in milliseconds to wait for flags
Returns
Result of API call, gos_result_t

gos_rtos_event_flags_wait_for_all()

gos_result_t gos_rtos_event_flags_wait_for_all ( gos_event_flags_t * event_flags,
uint32_t flags_to_wait_for,
uint32_t * flags_set_ptr,
uint32_t timeout_ms
)

Wait for all event flags to be set.

This has similar functionality to gos_rtos_event_flags_wait() except is pre-specifies:

Parameters
[in] event_flags : Pointer to the event flags handle
[in] flags_to_wait_for : Group of event flags (ORed bit-fields) to wait for
[out] flags_set_ptr : Pointer to hold flags there were successfully set, optional, leave NULL if unused
[in] timeout_ms : Time in milliseconds to wait for flags
Returns
Result of API call, gos_result_t

gos_rtos_event_flags_wait_for_any()

gos_result_t gos_rtos_event_flags_wait_for_any ( gos_event_flags_t * event_flags,
uint32_t flags_to_wait_for,
uint32_t * flags_set_ptr,
uint32_t timeout_ms
)

Wait for any event flags to be set.

This has similar functionality to gos_rtos_event_flags_wait() except is pre-specifies:

Parameters
[in] event_flags : Pointer to the event flags handle
[in] flags_to_wait_for : Group of event flags (ORed bit-fields) to wait for
[out] flags_set_ptr : Pointer to hold flags there were successfully set, optional, leave NULL if unused
[in] timeout_ms : Time in milliseconds to wait for flags
Returns
Result of API call, gos_result_t