/* Check if internal queue has pending events. 
This function returns true if the internal event queue is not empty. */
static bool win_are_events_pending(void)
/* Check if internal queue has pending events. 
This function returns true if the internal event queue is not empty. */
static bool win_are_events_pending(void)
{
	bool pending = false;
	irqflags_t iflags;
	iflags = cpu_irq_save();
	if (win_event_queue.used > 0) {
		pending = true;
	}
	cpu_irq_restore(iflags);
	return pending;
}