Guest User

Untitled

a guest
Jul 19th, 2018
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.52 KB | None | 0 0
  1. #ifndef dCouple_Digital_PushButton_h
  2. #define dCouple_Digital_PushButton_h
  3.  
  4. class PushButton: public dCouple::State {
  5.  
  6. void (*button_low_callback)(PushButton*);
  7. void (*button_high_callback)(PushButton*);
  8. void (*button_changed_callback)(PushButton*);
  9. bool debouncing;
  10.  
  11. public:
  12. PushButton();
  13. void set_button_low_callback(void(*_callback)(PushButton*));
  14. void set_button_high_callback(void(*_callback)(PushButton*));
  15. void set_button_changed_callback(void(*_callback)(PushButton*));
  16. void state_has_changed();
  17.  
  18. };
  19.  
  20. #endif
Add Comment
Please, Sign In to add comment