Subversion Repositories Code-Repo

Rev

Rev 163 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 163 Rev 271
Line 1... Line 1...
1
#ifndef CPS_H
1
#ifndef CPS_H
2
#define	CPS_H
2
#define	CPS_H
3
 
3
 
-
 
4
// Size of rolling average buffer
4
#define CPS_AVG_COUNT 16
5
#define CPS_AVG_COUNT 16
-
 
6
 
-
 
7
// Number of capacitance button inputs
-
 
8
#define CPS_NUM_CHANNELS 2
-
 
9
 
-
 
10
// Percentage of capacitance change to register button press
5
#define CPS_PCT_ON 10
11
#define CPS_PCT_ON 10
6
#define CPS_PCT_OFF 8
12
#define CPS_PCT_OFF 8
7
#define CPS_NUM_CHANNELS 2
-
 
-
 
13
 
8
typedef struct {
14
typedef struct {
9
    char channel;
15
    char channel;
10
    char btn_pressed[4];
16
    char btn_pressed[4];
11
    unsigned int btn_last_value[4];
17
    unsigned int btn_last_value[4];
12
    unsigned int btn_avg_value[4];
18
    unsigned int btn_avg_value[4];