
/*
 * switches.h
 *
 *  Created on: 6 Aug 2016
 *      Author: Mike
 */

#ifndef INC_SWITCHES_H_
#define INC_SWITCHES_H_

#define MAX_DIALS 2
#define MAX_PUSHBUTTONS 2

#if defined __cplusplus
extern "C" {
#endif

extern volatile int push_pos[MAX_PUSHBUTTONS];
extern volatile int sw_count[MAX_PUSHBUTTONS]; //< debounced switch state

extern void InitSwitches(void);

extern void reset_dial(int dial,int value);

extern void HandleSwitches(void);

/// @brief Get the difference in count between the last call and this call 
extern int get_dial_diff(int dial);


#if defined __cplusplus
}
#endif


#endif /* INC_SWITCHES_H_ */
