SHARE
TWEET

Event.h

a guest Apr 22nd, 2015 13 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top