Bläddra i källkod

blink: support ESP8684-DevKitM board

morris 3 år sedan
förälder
incheckning
aaa2eca57d

+ 7 - 1
examples/common_components/led_strip/CMakeLists.txt

@@ -1,3 +1,9 @@
-idf_component_register(SRCS "src/led_strip_rmt_dev.c" "src/led_strip_rmt_encoder.c"
+set(srcs)
+
+if(CONFIG_SOC_RMT_SUPPORTED)
+    list(APPEND srcs "src/led_strip_rmt_dev.c" "src/led_strip_rmt_encoder.c")
+endif()
+
+idf_component_register(SRCS ${srcs}
                        INCLUDE_DIRS "include" "interface"
                        PRIV_REQUIRES "driver")

+ 2 - 2
examples/get-started/blink/README.md

@@ -12,7 +12,7 @@ Before project configuration and build, be sure to set the correct chip target u
 
 ### Hardware Required
 
-* A development board with ESP32/ESP32-S2/ESP32-S3/ESP32-C3 SoC (e.g., ESP32-DevKitC, ESP-WROVER-KIT, etc.)
+* A development board with Espressif SoC (e.g., ESP32-DevKitC, ESP-WROVER-KIT, etc.)
 * A USB cable for Power supply and programming
 
 Some development boards use an addressable LED instead of a regular one. These development boards include:
@@ -48,7 +48,7 @@ See the [Getting Started Guide](https://docs.espressif.com/projects/esp-idf/en/l
 
 ## Example Output
 
-As you run the example, you will see the LED blinking, according to the previously defined period. For the addressable LED, you can also change the LED color by setting the `led_strip_set_pixel(pStrip_a, 0, 16, 16, 16);` (LED Strip, Pixel Number, Red, Green, Blue) with values from 0 to 255 in the `blink.c` file.
+As you run the example, you will see the LED blinking, according to the previously defined period. For the addressable LED, you can also change the LED color by setting the `led_strip_set_pixel(led_strip, 0, 16, 16, 16);` (LED Strip, Pixel Number, Red, Green, Blue) with values from 0 to 255 in the [source file](main/blink_example_main.c).
 
 ```
 I (315) example: Example configured to blink addressable LED!

+ 1 - 1
examples/get-started/blink/main/CMakeLists.txt

@@ -1,2 +1,2 @@
 idf_component_register(SRCS "blink_example_main.c"
-                    INCLUDE_DIRS ".")
+                       INCLUDE_DIRS ".")

+ 2 - 2
examples/get-started/blink/main/Kconfig.projbuild

@@ -2,7 +2,7 @@ menu "Example Configuration"
 
     choice BLINK_LED
         prompt "Blink LED type"
-        default BLINK_LED_GPIO if IDF_TARGET_ESP32
+        default BLINK_LED_GPIO if IDF_TARGET_ESP32 || IDF_TARGET_ESP32C2
         default BLINK_LED_RMT
         help
             Defines the default peripheral for blink example
@@ -16,7 +16,7 @@ menu "Example Configuration"
     config BLINK_GPIO
         int "Blink GPIO number"
         range 0 48
-        default 8 if IDF_TARGET_ESP32C3 || IDF_TARGET_ESP32H2
+        default 8 if IDF_TARGET_ESP32C3 || IDF_TARGET_ESP32H2 || IDF_TARGET_ESP32C2
         default 18 if IDF_TARGET_ESP32S2
         default 48 if IDF_TARGET_ESP32S3
         default 5