| 200 |
Kevin |
1 |
#ifndef BTN_H
|
|
|
2 |
#define BTN_H
|
|
|
3 |
|
|
|
4 |
// BTN1 = CN8, BTN2 = CN9, BTN3 = CN19
|
|
|
5 |
// BTN1 = RG6, BTN2 = RG7, BTN3 = RD13
|
|
|
6 |
// Note: Write to PORTx is effectively the same as write to LATx
|
|
|
7 |
#define BTN1_TRIS TRISGbits.TRISG6
|
|
|
8 |
#define BTN1_PORT PORTGbits.RG6
|
|
|
9 |
#define BTN2_TRIS TRISGbits.TRISG7
|
|
|
10 |
#define BTN2_PORT PORTGbits.RG7
|
|
|
11 |
#define BTN3_TRIS TRISDbits.TRISD13
|
|
|
12 |
#define BTN3_PORT PORTDbits.RD13
|
|
|
13 |
|
|
|
14 |
#define BTN_DEBOUNCE_MS 1
|
|
|
15 |
|
|
|
16 |
void BTN_Init(void (*callback_1)(void), void (*callback_2)(void), void (*callback_3)(void));
|
|
|
17 |
|
|
|
18 |
#endif /* BTN_H */
|
|
|
19 |
|