Go to the documentation of this file.
16 #define ADP5589_KEYMAPSIZE 88
18 #define ADP5589_GPI_PIN_ROW0 97
19 #define ADP5589_GPI_PIN_ROW1 98
20 #define ADP5589_GPI_PIN_ROW2 99
21 #define ADP5589_GPI_PIN_ROW3 100
22 #define ADP5589_GPI_PIN_ROW4 101
23 #define ADP5589_GPI_PIN_ROW5 102
24 #define ADP5589_GPI_PIN_ROW6 103
25 #define ADP5589_GPI_PIN_ROW7 104
26 #define ADP5589_GPI_PIN_COL0 105
27 #define ADP5589_GPI_PIN_COL1 106
28 #define ADP5589_GPI_PIN_COL2 107
29 #define ADP5589_GPI_PIN_COL3 108
30 #define ADP5589_GPI_PIN_COL4 109
31 #define ADP5589_GPI_PIN_COL5 110
32 #define ADP5589_GPI_PIN_COL6 111
33 #define ADP5589_GPI_PIN_COL7 112
34 #define ADP5589_GPI_PIN_COL8 113
35 #define ADP5589_GPI_PIN_COL9 114
36 #define ADP5589_GPI_PIN_COL10 115
37 #define GPI_LOGIC1 116
38 #define GPI_LOGIC2 117
40 #define ADP5589_GPI_PIN_ROW_BASE ADP5589_GPI_PIN_ROW0
41 #define ADP5589_GPI_PIN_ROW_END ADP5589_GPI_PIN_ROW7
42 #define ADP5589_GPI_PIN_COL_BASE ADP5589_GPI_PIN_COL0
43 #define ADP5589_GPI_PIN_COL_END ADP5589_GPI_PIN_COL10
45 #define ADP5589_GPI_PIN_BASE ADP5589_GPI_PIN_ROW_BASE
46 #define ADP5589_GPI_PIN_END ADP5589_GPI_PIN_COL_END
48 #define ADP5589_GPIMAPSIZE_MAX (ADP5589_GPI_PIN_END - ADP5589_GPI_PIN_BASE + 1)
54 #define ADP5585_KEYMAPSIZE 30
56 #define ADP5585_GPI_PIN_ROW0 37
57 #define ADP5585_GPI_PIN_ROW1 38
58 #define ADP5585_GPI_PIN_ROW2 39
59 #define ADP5585_GPI_PIN_ROW3 40
60 #define ADP5585_GPI_PIN_ROW4 41
61 #define ADP5585_GPI_PIN_ROW5 42
62 #define ADP5585_GPI_PIN_COL0 43
63 #define ADP5585_GPI_PIN_COL1 44
64 #define ADP5585_GPI_PIN_COL2 45
65 #define ADP5585_GPI_PIN_COL3 46
66 #define ADP5585_GPI_PIN_COL4 47
69 #define ADP5585_GPI_PIN_ROW_BASE ADP5585_GPI_PIN_ROW0
70 #define ADP5585_GPI_PIN_ROW_END ADP5585_GPI_PIN_ROW5
71 #define ADP5585_GPI_PIN_COL_BASE ADP5585_GPI_PIN_COL0
72 #define ADP5585_GPI_PIN_COL_END ADP5585_GPI_PIN_COL4
74 #define ADP5585_GPI_PIN_BASE ADP5585_GPI_PIN_ROW_BASE
75 #define ADP5585_GPI_PIN_END ADP5585_GPI_PIN_COL_END
77 #define ADP5585_GPIMAPSIZE_MAX (ADP5585_GPI_PIN_END - ADP5585_GPI_PIN_BASE + 1)
85 #define ADP5589_SCAN_CYCLE_10ms 0
86 #define ADP5589_SCAN_CYCLE_20ms 1
87 #define ADP5589_SCAN_CYCLE_30ms 2
88 #define ADP5589_SCAN_CYCLE_40ms 3
91 #define RESET_PULSE_WIDTH_500us 0
92 #define RESET_PULSE_WIDTH_1ms 1
93 #define RESET_PULSE_WIDTH_2ms 2
94 #define RESET_PULSE_WIDTH_10ms 3
96 #define RESET_TRIG_TIME_0ms (0 << 2)
97 #define RESET_TRIG_TIME_1000ms (1 << 2)
98 #define RESET_TRIG_TIME_1500ms (2 << 2)
99 #define RESET_TRIG_TIME_2000ms (3 << 2)
100 #define RESET_TRIG_TIME_2500ms (4 << 2)
101 #define RESET_TRIG_TIME_3000ms (5 << 2)
102 #define RESET_TRIG_TIME_3500ms (6 << 2)
103 #define RESET_TRIG_TIME_4000ms (7 << 2)
105 #define RESET_PASSTHRU_EN (1 << 5)
106 #define RESET1_POL_HIGH (1 << 6)
107 #define RESET1_POL_LOW (0 << 6)
108 #define RESET2_POL_HIGH (1 << 7)
109 #define RESET2_POL_LOW (0 << 7)
120 #define ADP_ROW(x) (1 << (x))
121 #define ADP_COL(x) (1 << (x + 8))
122 #define ADP5589_ROW_MASK 0xFF
123 #define ADP5589_COL_MASK 0xFF
124 #define ADP5589_COL_SHIFT 8
125 #define ADP5589_MAX_ROW_NUM 7
126 #define ADP5589_MAX_COL_NUM 10
137 #define ADP5585_ROW_MASK 0x3F
138 #define ADP5585_COL_MASK 0x1F
139 #define ADP5585_ROW_SHIFT 0
140 #define ADP5585_COL_SHIFT 6
141 #define ADP5585_MAX_ROW_NUM 5
142 #define ADP5585_MAX_COL_NUM 4
144 #define ADP5585_ROW(x) (1 << ((x) & ADP5585_ROW_MASK))
145 #define ADP5585_COL(x) (1 << (((x) & ADP5585_COL_MASK) + ADP5585_COL_SHIFT))
180 int gpio,
unsigned ngpio,
183 int gpio,
unsigned ngpio,