Skip to content

Commit 63c8e83

Browse files
committed
feat(matter): add button and led gpio with kconfig
1 parent 196f63d commit 63c8e83

File tree

1 file changed

+102
-0
lines changed

1 file changed

+102
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
1+
menu "Light Matter Accessory"
2+
menu "On Board Light ON/OFF Button"
3+
config BUTTON_PIN
4+
int
5+
prompt "Button 1 GPIO"
6+
default ENV_GPIO_BOOT_BUTTON
7+
range -1 ENV_GPIO_IN_RANGE_MAX
8+
help
9+
The GPIO pin for button that will be used to turn on/off the Matter Light. It shall be connected to a push button. It can use the BOOT button of the development board.
10+
endmenu
11+
12+
13+
menu "LEDs"
14+
config WS2812_PIN
15+
int
16+
prompt "WS2812 RGB LED GPIO"
17+
default ENV_GPIO_RGB_LED
18+
range -1 ENV_GPIO_OUT_RANGE_MAX
19+
help
20+
The GPIO pin for the Matter Light that will be driven by RMT. It shall be connected to one single WS2812 RGB LED.
21+
endmenu
22+
23+
# TARGET CONFIGURATION
24+
if IDF_TARGET_ESP32C3
25+
config ENV_GPIO_RANGE_MIN
26+
int
27+
default 0
28+
29+
config ENV_GPIO_RANGE_MAX
30+
int
31+
default 19
32+
# GPIOs 20/21 are always used by UART in examples
33+
34+
config ENV_GPIO_IN_RANGE_MAX
35+
int
36+
default ENV_GPIO_RANGE_MAX
37+
38+
config ENV_GPIO_OUT_RANGE_MAX
39+
int
40+
default ENV_GPIO_RANGE_MAX
41+
42+
config ENV_GPIO_BOOT_BUTTON
43+
int
44+
default 9
45+
46+
config ENV_GPIO_RGB_LED
47+
int
48+
default 8
49+
endif
50+
if IDF_TARGET_ESP32C6
51+
config ENV_GPIO_RANGE_MIN
52+
int
53+
default 0
54+
55+
config ENV_GPIO_RANGE_MAX
56+
int
57+
default 30
58+
# GPIOs 16/17 are always used by UART in examples
59+
60+
config ENV_GPIO_IN_RANGE_MAX
61+
int
62+
default ENV_GPIO_RANGE_MAX
63+
64+
config ENV_GPIO_OUT_RANGE_MAX
65+
int
66+
default ENV_GPIO_RANGE_MAX
67+
68+
config ENV_GPIO_BOOT_BUTTON
69+
int
70+
default 9
71+
72+
config ENV_GPIO_RGB_LED
73+
int
74+
default 8
75+
endif
76+
if IDF_TARGET_ESP32S3
77+
config ENV_GPIO_RANGE_MIN
78+
int
79+
default 0
80+
81+
config ENV_GPIO_RANGE_MAX
82+
int
83+
default 48
84+
85+
config ENV_GPIO_IN_RANGE_MAX
86+
int
87+
default ENV_GPIO_RANGE_MAX
88+
89+
config ENV_GPIO_OUT_RANGE_MAX
90+
int
91+
default ENV_GPIO_RANGE_MAX
92+
93+
config ENV_GPIO_BOOT_BUTTON
94+
int
95+
default 0
96+
97+
config ENV_GPIO_RGB_LED
98+
int
99+
default 48
100+
endif
101+
102+
endmenu

0 commit comments

Comments
 (0)