Subversion Repositories Code-Repo

Rev

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

Rev 201 Rev 212
Line 1... Line 1...
1
#ifndef BTN_H
1
#ifndef BTN_H
2
#define	BTN_H
2
#define	BTN_H
3
 
3
 
4
// BTN1 = CN8, BTN2 = CN9, BTN3 = CN19
4
// BTN1 = CN8, BTN2 = CN9, BTN3 = CN19 (32MX7 only)
5
// BTN1 = RG6, BTN2 = RG7, BTN3 = RD13
5
// BTN1 = RG6, BTN2 = RG7, BTN3 = RD13 (32MX7 only)
6
// Note: Write to PORTx is effectively the same as write to LATx
6
// Note: Write to PORTx is effectively the same as write to LATx
7
#define BTN1_TRIS TRISGbits.TRISG6
7
#define BTN1_TRIS TRISGbits.TRISG6
8
#define BTN1_PORT PORTGbits.RG6
8
#define BTN1_PORT PORTGbits.RG6
9
#define BTN2_TRIS TRISGbits.TRISG7
9
#define BTN2_TRIS TRISGbits.TRISG7
10
#define BTN2_PORT PORTGbits.RG7
10
#define BTN2_PORT PORTGbits.RG7
-
 
11
 
-
 
12
#if defined CEREBOT_32MX7
11
#define BTN3_TRIS TRISDbits.TRISD13
13
#define BTN3_TRIS TRISDbits.TRISD13
12
#define BTN3_PORT PORTDbits.RD13
14
#define BTN3_PORT PORTDbits.RD13
-
 
15
#elif defined CEREBOT_MX7CK
-
 
16
#define BTN3_TRIS TRISAbits.TRISA0
-
 
17
#define BTN3_PORT PORTAbits.RA0
-
 
18
#endif
13
 
19
 
14
#define BTN_DEBOUNCE_MS 1
20
#define BTN_DEBOUNCE_MS 1
15
 
21
 
16
typedef struct {
22
typedef struct {
17
    void (*callback_function_1)(void);
23
    void (*callback_function_1)(void);