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.
 
 
 
 
 

25 lines
560 B

#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
#define EVENT_NONE 0xffff
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 */