forked from espressif/esp-idf
feat(blink): add sdkconfig defaults for each target
based on devkit board design
This commit is contained in:
@@ -2,9 +2,11 @@
|
|||||||
|
|
||||||
examples/get-started/blink:
|
examples/get-started/blink:
|
||||||
disable:
|
disable:
|
||||||
- if: IDF_TARGET in ["esp32p4", "esp32c5"]
|
- if: SOC_GPSPI_SUPPORTED != 1 and SOC_RMT_SUPPORTED != 1 # The blink example relies on the RMT or GPSPI to drive the led strip
|
||||||
temporary: true
|
depends_components:
|
||||||
reason: target esp32p4 and esp32c5 are not supported yet # TODO: IDF-8074, [ESP32C5] IDF-9006
|
- esp_driver_gpio
|
||||||
|
- esp_driver_spi
|
||||||
|
- esp_driver_rmt
|
||||||
|
|
||||||
examples/get-started/hello_world:
|
examples/get-started/hello_world:
|
||||||
enable:
|
enable:
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
| Supported Targets | ESP32 | ESP32-C2 | ESP32-C3 | ESP32-C6 | ESP32-H2 | ESP32-S2 | ESP32-S3 |
|
| Supported Targets | ESP32 | ESP32-C2 | ESP32-C3 | ESP32-C6 | ESP32-H2 | ESP32-P4 | ESP32-S2 | ESP32-S3 |
|
||||||
| ----------------- | ----- | -------- | -------- | -------- | -------- | -------- | -------- |
|
| ----------------- | ----- | -------- | -------- | -------- | -------- | -------- | -------- | -------- |
|
||||||
|
|
||||||
# Blink Example
|
# Blink Example
|
||||||
|
|
||||||
|
@@ -4,8 +4,7 @@ menu "Example Configuration"
|
|||||||
|
|
||||||
choice BLINK_LED
|
choice BLINK_LED
|
||||||
prompt "Blink LED type"
|
prompt "Blink LED type"
|
||||||
default BLINK_LED_GPIO if IDF_TARGET_ESP32 || IDF_TARGET_ESP32C2
|
default BLINK_LED_GPIO
|
||||||
default BLINK_LED_STRIP
|
|
||||||
help
|
help
|
||||||
Select the LED type. A normal level controlled LED or an addressable LED strip.
|
Select the LED type. A normal level controlled LED or an addressable LED strip.
|
||||||
The default selection is based on the Espressif DevKit boards.
|
The default selection is based on the Espressif DevKit boards.
|
||||||
@@ -35,9 +34,6 @@ menu "Example Configuration"
|
|||||||
config BLINK_GPIO
|
config BLINK_GPIO
|
||||||
int "Blink GPIO number"
|
int "Blink GPIO number"
|
||||||
range ENV_GPIO_RANGE_MIN ENV_GPIO_OUT_RANGE_MAX
|
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
|
default 8
|
||||||
help
|
help
|
||||||
GPIO number (IOxx) to blink on and off the LED.
|
GPIO number (IOxx) to blink on and off the LED.
|
||||||
|
@@ -1,6 +1,5 @@
|
|||||||
# SPDX-FileCopyrightText: 2022 Espressif Systems (Shanghai) CO LTD
|
# SPDX-FileCopyrightText: 2022 Espressif Systems (Shanghai) CO LTD
|
||||||
# SPDX-License-Identifier: CC0-1.0
|
# SPDX-License-Identifier: CC0-1.0
|
||||||
|
|
||||||
import logging
|
import logging
|
||||||
import os
|
import os
|
||||||
|
|
||||||
@@ -8,7 +7,6 @@ import pytest
|
|||||||
from pytest_embedded_idf.dut import IdfDut
|
from pytest_embedded_idf.dut import IdfDut
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.temp_skip_ci(targets=['esp32p4'], reason='esp32p4 support TBD') # TODO: IDF-8988
|
|
||||||
@pytest.mark.supported_targets
|
@pytest.mark.supported_targets
|
||||||
@pytest.mark.generic
|
@pytest.mark.generic
|
||||||
def test_blink(dut: IdfDut) -> None:
|
def test_blink(dut: IdfDut) -> None:
|
||||||
|
@@ -1,2 +0,0 @@
|
|||||||
CONFIG_BLINK_LED_STRIP=y
|
|
||||||
CONFIG_BLINK_LED_STRIP_BACKEND_SPI=y
|
|
2
examples/get-started/blink/sdkconfig.defaults
Normal file
2
examples/get-started/blink/sdkconfig.defaults
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
CONFIG_BLINK_LED_GPIO=y
|
||||||
|
CONFIG_BLINK_GPIO=8
|
1
examples/get-started/blink/sdkconfig.defaults esp32h2
Normal file
1
examples/get-started/blink/sdkconfig.defaults esp32h2
Normal file
@@ -0,0 +1 @@
|
|||||||
|
CONFIG_BLINK_LED_STRIP=y
|
1
examples/get-started/blink/sdkconfig.defaults.esp32
Normal file
1
examples/get-started/blink/sdkconfig.defaults.esp32
Normal file
@@ -0,0 +1 @@
|
|||||||
|
CONFIG_BLINK_GPIO=5
|
1
examples/get-started/blink/sdkconfig.defaults.esp32c3
Normal file
1
examples/get-started/blink/sdkconfig.defaults.esp32c3
Normal file
@@ -0,0 +1 @@
|
|||||||
|
CONFIG_BLINK_LED_STRIP=y
|
2
examples/get-started/blink/sdkconfig.defaults.esp32c5
Normal file
2
examples/get-started/blink/sdkconfig.defaults.esp32c5
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
CONFIG_BLINK_GPIO=6
|
||||||
|
CONFIG_BLINK_LED_STRIP=y
|
1
examples/get-started/blink/sdkconfig.defaults.esp32c6
Normal file
1
examples/get-started/blink/sdkconfig.defaults.esp32c6
Normal file
@@ -0,0 +1 @@
|
|||||||
|
CONFIG_BLINK_LED_STRIP=y
|
2
examples/get-started/blink/sdkconfig.defaults.esp32s2
Normal file
2
examples/get-started/blink/sdkconfig.defaults.esp32s2
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
CONFIG_BLINK_LED_STRIP=y
|
||||||
|
CONFIG_BLINK_GPIO=18
|
2
examples/get-started/blink/sdkconfig.defaults.esp32s3
Normal file
2
examples/get-started/blink/sdkconfig.defaults.esp32s3
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
CONFIG_BLINK_LED_STRIP=y
|
||||||
|
CONFIG_BLINK_GPIO=48
|
Reference in New Issue
Block a user