mirror of
https://github.com/espressif/esp-idf.git
synced 2024-09-20 00:36:01 -04:00
Merge branch 'feat/blink_example_refactor' into 'master'
feat(blink): add sdkconfig defaults for each target Closes IDF-8988, IDF-8074, and IDF-9006 See merge request espressif/esp-idf!28887
This commit is contained in:
commit
d426036168
@ -2,9 +2,11 @@
|
||||
|
||||
examples/get-started/blink:
|
||||
disable:
|
||||
- if: IDF_TARGET in ["esp32p4", "esp32c5"]
|
||||
temporary: true
|
||||
reason: target esp32p4 and esp32c5 are not supported yet # TODO: IDF-8074, [ESP32C5] IDF-9006
|
||||
- if: SOC_GPSPI_SUPPORTED != 1 and SOC_RMT_SUPPORTED != 1 # The blink example relies on the RMT or GPSPI to drive the led strip
|
||||
depends_components:
|
||||
- esp_driver_gpio
|
||||
- esp_driver_spi
|
||||
- esp_driver_rmt
|
||||
|
||||
examples/get-started/hello_world:
|
||||
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
|
||||
|
||||
|
@ -4,8 +4,7 @@ menu "Example Configuration"
|
||||
|
||||
choice BLINK_LED
|
||||
prompt "Blink LED type"
|
||||
default BLINK_LED_GPIO if IDF_TARGET_ESP32 || IDF_TARGET_ESP32C2
|
||||
default BLINK_LED_STRIP
|
||||
default BLINK_LED_GPIO
|
||||
help
|
||||
Select the LED type. A normal level controlled LED or an addressable LED strip.
|
||||
The default selection is based on the Espressif DevKit boards.
|
||||
@ -35,9 +34,6 @@ menu "Example Configuration"
|
||||
config BLINK_GPIO
|
||||
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.
|
||||
|
@ -1,6 +1,5 @@
|
||||
# SPDX-FileCopyrightText: 2022 Espressif Systems (Shanghai) CO LTD
|
||||
# SPDX-License-Identifier: CC0-1.0
|
||||
|
||||
import logging
|
||||
import os
|
||||
|
||||
@ -8,7 +7,6 @@ import pytest
|
||||
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.generic
|
||||
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
|
Loading…
Reference in New Issue
Block a user