Below is the file 'event.h' from this revision. You can also download the file.

#ifndef __EVENT_H
#define __EVENT_H

#include "types.h"

#define EVENT_TIMER		0
#define EVENT_I2C_COMPLETE	1
#define EVENT_UART_INPUT	2

#define EVENT_MAX		2

typedef void event_handler(void);

void event_set(unsigned int event);
bool event_get(unsigned int *event);
void event_clear(unsigned int event);
void event_dispatch(void);
void event_register(unsigned int event, event_handler *handler);

#endif /* __EVENT_H */