Quadrotor from scratch
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

20 lines
421 B

#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 */