-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmatrix_keypad.h
33 lines (22 loc) · 974 Bytes
/
matrix_keypad.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
/*
* File: matrix_keypad.h
*/
#ifndef MATRIX_KEYPAD_H
#define MATRIX_KEYPAD_H
#define MATRIX_KEYPAD_COLUMN_PORT_DDR TRISB
#define MATRIX_KEYPAD_ROW_PORT_DDR TRISD
#define ROW1 RD3
#define ROW2 RD2
#define ROW3 RD1
#define ROW4 RD0
#define COL1 RB0
#define COL2 RB1
#define COL3 RB2
#define HI 1
#define LOW 0
#define STATE 1// STATE
#define LEVEL 0
#define ALL_RELEASED 0xFF
unsigned char read_matrix_keypad(unsigned char mode);
void init_matrix_keypad(void);
#endif /* MATRIX_KEYPAD_H */