Subversion Repositories DashDisplay

Rev

Rev 30 | Rev 44 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 30 Rev 38
Line 20... Line 20...
20
 
20
 
21
volatile static int sw_newstate[MAX_SWITCHES]; //< debounced switch state
21
volatile static int sw_newstate[MAX_SWITCHES]; //< debounced switch state
22
volatile static int sw_count[MAX_SWITCHES]; //< debounce counter
22
volatile static int sw_count[MAX_SWITCHES]; //< debounce counter
23
 
23
 
24
static const sGPIOPin sw_arr[MAX_SWITCHES] =
24
static const sGPIOPin sw_arr[MAX_SWITCHES] =
25
        { { SW1_I_GPIO_Port, SW1_I_Pin , 5}, // these two pins used to encode SW1 phase
25
        { { SW1_I_GPIO_Port, SW1_I_Pin , 3}, // these two pins used to encode SW1 phase
26
                        { SW1_Q_GPIO_Port, SW1_Q_Pin, 5 }, // "                             SW1 phase
26
                        { SW1_Q_GPIO_Port, SW1_Q_Pin, 3 }, // "                             SW1 phase
27
                        { SW2_I_GPIO_Port, SW2_I_Pin , 5}, // these two pins used to encode SW2 phase
27
                        { SW2_I_GPIO_Port, SW2_I_Pin , 3}, // these two pins used to encode SW2 phase
28
                        { SW2_Q_GPIO_Port, SW2_Q_Pin , 5}, // "                             SW2 phase
28
                        { SW2_Q_GPIO_Port, SW2_Q_Pin , 3}, // "                             SW2 phase
29
                        { SW1_PUSH_GPIO_Port, SW1_PUSH_Pin, 10 }, // two debounced switches
29
                        { SW1_PUSH_GPIO_Port, SW1_PUSH_Pin, 10 }, // two debounced switches
30
{ SW2_PUSH_GPIO_Port, SW2_PUSH_Pin, 10 }, };
30
{ SW2_PUSH_GPIO_Port, SW2_PUSH_Pin, 10 }, };
31
 
31
 
32
// call this to setup switch states
32
// call this to setup switch states
33
void InitSwitches(void) {
33
void InitSwitches(void) {