/* determine if desired set of events been satisfied 
This routine determines if the current set of events satisfies the desired set of events. If  */
static bool are_wait_conditions_met(uint32_t desired, uint32_t current, unsigned int wait_condition)
/* determine if desired set of events been satisfied 
This routine determines if the current set of events satisfies the desired set of events. If  */
static bool are_wait_conditions_met(uint32_t desired, uint32_t current, unsigned int wait_condition)
{
	uint32_t  match = current & desired;
	if (wait_condition == K_EVENT_WAIT_ALL) {
		return match == desired;
	}
	return match != 0;
}