Subversion Repositories DashDisplay

Rev

Rev 66 | Blame | Compare with Previous | Last modification | View Log | Download | RSS feed

  1. /*
  2.  * switches.h
  3.  *
  4.  *  Created on: 6 Aug 2016
  5.  *      Author: Mike
  6.  */
  7.  
  8. #ifndef INC_SWITCHES_H_
  9. #define INC_SWITCHES_H_
  10.  
  11. #define MAX_DIALS 2
  12. #define MAX_PUSHBUTTONS 2
  13.  
  14. #if defined __cplusplus
  15. extern "C" {
  16. #endif
  17.  
  18. extern volatile int push_pos[MAX_PUSHBUTTONS];
  19. extern volatile int sw_count[MAX_PUSHBUTTONS]; //< debounced switch state
  20.  
  21. extern void InitSwitches(void);
  22.  
  23. extern void reset_dial(int dial,int value);
  24.  
  25. extern void HandleSwitches(void);
  26.  
  27. /// @brief Get the difference in count between the last call and this call
  28. extern int get_dial_diff(int dial);
  29.  
  30.  
  31. #if defined __cplusplus
  32. }
  33. #endif
  34.  
  35.  
  36. #endif /* INC_SWITCHES_H_ */
  37.