Commit 289c2a1
authored
Use SDK macros for matrix detach constants (espressif#8345)
The constants that need to be passed to gpio_matrix_in and gpio_matrix_out
to detach an input or output pin from a peripheral vary by platform. Use
SIG_GPIO_OUT_IDX to detach an output, and GPIO_MATRIX_CONST_ONE_INPUT
and GPIO_MATRIX_CONST_ZERO_INPUT to detach an input. ESP32 before IDF 4.0
didn't define GPIO_MATRIX_CONST_*_INPUT, so add compatibility #defines
for GPIO_FUNC_IN_LOW/HIGH. GPIO_FUNC_IN_LOW/HIGH exist in IDF 4.0+, but
can't be used because they have the wrong values for ESP32-C3 at least
in IDF 4.4.3 (espressif/esp-idf#11737).1 parent 0950089 commit 289c2a1
1 file changed
+5
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| 20 | + | |
20 | 21 | | |
21 | | - | |
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
| 33 | + | |
| 34 | + | |
33 | 35 | | |
34 | 36 | | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | 37 | | |
39 | 38 | | |
40 | 39 | | |
| |||
43 | 42 | | |
44 | 43 | | |
45 | 44 | | |
46 | | - | |
| 45 | + | |
47 | 46 | | |
48 | 47 | | |
49 | 48 | | |
| |||
53 | 52 | | |
54 | 53 | | |
55 | 54 | | |
56 | | - | |
| 55 | + | |
57 | 56 | | |
58 | 57 | | |
59 | 58 | | |
| |||
0 commit comments