Advertisement
Guest User

Event.h

a guest
Apr 22nd, 2015
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.45 KB | None | 0 0
  1. // Event.h
  2.  
  3. #ifndef _EVENT_h
  4. #define _EVENT_h
  5.  
  6. #if defined(ARDUINO) && ARDUINO >= 100
  7. #include "arduino.h"
  8. #else
  9. #include "WProgram.h"
  10. #endif
  11.  
  12. #define INITIAL_EVENT_CAP 2
  13.  
  14. typedef struct
  15. {
  16. char* eventName;
  17. void **callbacks;
  18.  
  19. short size;
  20. short capacity;
  21. } Event;
  22.  
  23. void event_create(Event *event_s, char *eventName);
  24.  
  25. void event_send(Event *event_s, void *context);
  26. void event_add(Event *event_s, void(*callback)(void *));
  27.  
  28. #endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement