-
Notifications
You must be signed in to change notification settings - Fork 7.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'backport5.2/openthread_2024_3_14' into 'release/v5.2'
openthread modifications backport to 5.2 See merge request espressif/esp-idf!29654
- Loading branch information
Showing
13 changed files
with
344 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 7 additions & 0 deletions
7
examples/openthread/ot_common_components/ot_led/CMakeLists.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
if(CONFIG_OPENTHREAD_STATE_INDICATOR_ENABLE) | ||
set(srcs "ot_led_strip.c") | ||
endif() | ||
|
||
idf_component_register(SRCS "${srcs}" | ||
INCLUDE_DIRS "include" | ||
PRIV_REQUIRES led_strip openthread) |
128 changes: 128 additions & 0 deletions
128
examples/openthread/ot_common_components/ot_led/Kconfig.projbuild
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,128 @@ | ||
menu "OpenThread Device Role Indicator" | ||
|
||
orsource "$IDF_PATH/examples/common_components/env_caps/$IDF_TARGET/Kconfig.env_caps" | ||
|
||
config OPENTHREAD_STATE_INDICATOR_ENABLE | ||
depends on SOC_RMT_SUPPORTED | ||
bool 'Enable the LED for openthread deivce' | ||
default False | ||
help | ||
If enabled, the LED of ESP Openthread Device will display different colors based on the current role. | ||
|
||
config OPENTHREAD_STATE_INDICATOR_GPIO | ||
depends on OPENTHREAD_STATE_INDICATOR_ENABLE | ||
int "Blink GPIO number" | ||
range ENV_GPIO_RANGE_MIN ENV_GPIO_OUT_RANGE_MAX | ||
default 5 if IDF_TARGET_ESP32 | ||
default 18 if IDF_TARGET_ESP32S2 | ||
default 48 if IDF_TARGET_ESP32S3 | ||
default 8 | ||
help | ||
GPIO number (IOxx) to blink on and off the LED. | ||
Some GPIOs are used for other purposes (flash connections, etc.) and cannot be used to blink. | ||
|
||
menu "Indicator of Leader Device" | ||
config LEADER_INDICATOR_RED | ||
depends on OPENTHREAD_STATE_INDICATOR_ENABLE | ||
int "red config" | ||
range 0 255 | ||
default 40 | ||
help | ||
Red config of LED for OpenThread leader device | ||
|
||
config LEADER_INDICATOR_GREEN | ||
depends on OPENTHREAD_STATE_INDICATOR_ENABLE | ||
int "green config" | ||
range 0 255 | ||
default 0 | ||
help | ||
Red config of LED for OpenThread leader device | ||
|
||
config LEADER_INDICATOR_BLUE | ||
depends on OPENTHREAD_STATE_INDICATOR_ENABLE | ||
int "blue config" | ||
range 0 255 | ||
default 0 | ||
help | ||
Blue config of LED for OpenThread leader device | ||
endmenu | ||
|
||
menu "Indicator of Router Device" | ||
config ROUTER_INDICATOR_RED | ||
depends on OPENTHREAD_STATE_INDICATOR_ENABLE | ||
int "red config" | ||
range 0 255 | ||
default 0 | ||
help | ||
Red config of LED for OpenThread router device | ||
|
||
config ROUTER_INDICATOR_GREEN | ||
depends on OPENTHREAD_STATE_INDICATOR_ENABLE | ||
int "green config" | ||
range 0 255 | ||
default 0 | ||
help | ||
Green config of LED for OpenThread router device | ||
|
||
config ROUTER_INDICATOR_BLUE | ||
depends on OPENTHREAD_STATE_INDICATOR_ENABLE | ||
int "blue config" | ||
range 0 255 | ||
default 40 | ||
help | ||
Blue config of LED for OpenThread router device | ||
endmenu | ||
|
||
menu "Indicator of Child Device" | ||
config CHILD_INDICATOR_RED | ||
depends on OPENTHREAD_STATE_INDICATOR_ENABLE | ||
int "red config" | ||
range 0 255 | ||
default 0 | ||
help | ||
Red config of LED for OpenThread child device | ||
|
||
config CHILD_INDICATOR_GREEN | ||
depends on OPENTHREAD_STATE_INDICATOR_ENABLE | ||
int "green config" | ||
range 0 255 | ||
default 40 | ||
help | ||
Green config of LED for OpenThread child device | ||
|
||
config CHILD_INDICATOR_BLUE | ||
depends on OPENTHREAD_STATE_INDICATOR_ENABLE | ||
int "blue config" | ||
range 0 255 | ||
default 0 | ||
help | ||
Blue config of LED for OpenThread child device | ||
endmenu | ||
|
||
menu "Indicator of Detached Device" | ||
config DETACHED_INDICATOR_RED | ||
depends on OPENTHREAD_STATE_INDICATOR_ENABLE | ||
int "red config" | ||
range 0 255 | ||
default 20 | ||
help | ||
Red config of LED for OpenThread detached device | ||
|
||
config DETACHED_INDICATOR_GREEN | ||
depends on OPENTHREAD_STATE_INDICATOR_ENABLE | ||
int "green config" | ||
range 0 255 | ||
default 20 | ||
help | ||
Green config of LED for OpenThread detached device | ||
|
||
config DETACHED_INDICATOR_BLUE | ||
depends on OPENTHREAD_STATE_INDICATOR_ENABLE | ||
int "blue config" | ||
range 0 255 | ||
default 20 | ||
help | ||
Blue config of LED for OpenThread detached device | ||
endmenu | ||
|
||
endmenu |
2 changes: 2 additions & 0 deletions
2
examples/openthread/ot_common_components/ot_led/idf_component.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
dependencies: | ||
espressif/led_strip: "^2.4.1" |
Oops, something went wrong.