Skip to content

Commit

Permalink
Merge pull request #363 from suda-morris/change/led_strip_dependency
Browse files Browse the repository at this point in the history
Change/led strip dependency
  • Loading branch information
suda-morris authored Aug 15, 2024
2 parents dd2ce03 + 1bceed7 commit 60c1426
Show file tree
Hide file tree
Showing 4 changed files with 148 additions and 220 deletions.
16 changes: 16 additions & 0 deletions led_strip/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
## 2.5.5

- Simplified the led_strip component dependency, the time of full build with ESP-IDF v5.3 can now be shorter.

## 2.5.4

- Inserted extra delay when initialize the SPI LED device, to ensure all LEDs are in the reset state correctly

## 2.5.3

- Extend reset time (280us) to support WS2812B-V5

## 2.5.2

- Added API reference doc (api.md)

## 2.5.0

- Enabled support for IDF4.4 and above
Expand Down
15 changes: 12 additions & 3 deletions led_strip/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,22 +1,31 @@
include($ENV{IDF_PATH}/tools/cmake/version.cmake)

set(srcs "src/led_strip_api.c")
set(public_requires)

# Starting from esp-idf v5.x, the RMT driver is rewritten
if("${IDF_VERSION_MAJOR}.${IDF_VERSION_MINOR}" VERSION_GREATER_EQUAL "5.0")
if(CONFIG_SOC_RMT_SUPPORTED)
list(APPEND srcs "src/led_strip_rmt_dev.c" "src/led_strip_rmt_encoder.c")
endif()
else()
else()
list(APPEND srcs "src/led_strip_rmt_dev_idf4.c")
endif()

# the SPI backend driver relies on something that was added in IDF 5.1
# the SPI backend driver relies on some feature that was available in IDF 5.1
if("${IDF_VERSION_MAJOR}.${IDF_VERSION_MINOR}" VERSION_GREATER_EQUAL "5.1")
if(CONFIG_SOC_GPSPI_SUPPORTED)
list(APPEND srcs "src/led_strip_spi_dev.c")
endif()
endif()

# Starting from esp-idf v5.3, the RMT and SPI drivers are moved to separate components
if("${IDF_VERSION_MAJOR}.${IDF_VERSION_MINOR}" VERSION_GREATER_EQUAL "5.3")
list(APPEND public_requires "esp_driver_rmt" "esp_driver_spi")
else()
list(APPEND public_requires "driver")
endif()

idf_component_register(SRCS ${srcs}
INCLUDE_DIRS "include" "interface"
REQUIRES "driver")
REQUIRES ${public_requires})
Loading

0 comments on commit 60c1426

Please sign in to comment.