The unified diff between revisions [cc8258a6..] and [bfc9e27f..] is displayed below. It can also be downloaded as a raw diff.
This diff has been restricted to the following files: 'event.h'
# # old_revision [cc8258a6c3643514892e84cf24fed008bc6f9660] # new_revision [bfc9e27f5c40da31ae4269394aaf0545e5856a70] # # add_file "event.h" # content [0632e17e87168fb527bcf1c58fa41d21f747eda9] # ============================================================ --- /dev/null +++ event.h 0632e17e87168fb527bcf1c58fa41d21f747eda9 @@ -0,0 +1,23 @@ +#ifndef __EVENT_H +#define __EVENT_H + +#include "types.h" + +#define EVENT_TIMER 0 +#define EVENT_MPU6050_I2C_COMPLETE 1 +#define EVENT_HMC5883L_I2C_COMPLETE 2 +#define EVENT_MPL3115A2_I2C_COMPLETE 3 +#define EVENT_UART_INPUT 4 +#define EVENT_SDCARD 5 + +#define EVENT_MAX 5 + +typedef void event_handler(void); + +void event_set(unsigned int event); +bool event_get(unsigned int *event); +void event_clear(unsigned int event); +bool event_dispatch(void); +void event_register(unsigned int event, event_handler *handler); + +#endif /* __EVENT_H */