avr-fw-modules/core/src/event_pull.c

21 lines
270 B
C
Raw Permalink Normal View History

2017-09-27 13:25:39 +02:00
#include <hwo/events.h>
#include <sys/atomic.h>
#include <hwo/threads.h>
#include <stdlib.h>
/*! \brief Wartet auf einen Event und liefert ihn zurück.
*
*/
EVENT* event_pull(void)
{
EVENT *e;
do
{
e = event_wait( 100 );
if (e)
return e;
} while (1);
};