-
-
Notifications
You must be signed in to change notification settings - Fork 209
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #639 from lovyan03/develop
1.2.0
- Loading branch information
Showing
51 changed files
with
3,995 additions
and
2,427 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
name: PicoSDKBuild | ||
|
||
env: | ||
WORKSPACE_DIR: examples_for_picosdk | ||
PROJECT_DIR: i2c | ||
|
||
on: | ||
push: | ||
paths: | ||
- '**.ino' | ||
- '**.cpp' | ||
- '**.hpp' | ||
- '**.h' | ||
- '**.c' | ||
- '**PicoSDKBuild.yml' | ||
pull_request: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build: | ||
name: ${{ matrix.board }}@${{ matrix.sdk-version }} | ||
|
||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
matrix: | ||
|
||
include: | ||
- { board: rp2350, sdk-version: 2.0.0, sdk-extras-version: sdk-2.0.0 } | ||
- { board: rp2040, sdk-version: 2.0.0, sdk-extras-version: sdk-2.0.0 } | ||
- { board: rp2040, sdk-version: 1.5.1, sdk-extras-version: sdk-1.5.1 } | ||
|
||
fail-fast: false | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
ref: ${{ github.event.pull_request.head.sha }} | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: '3.9' | ||
|
||
- name: install deps | ||
run: | | ||
sudo apt install ca-certificates build-essential avr-libc gcc-avr gcc-arm-none-eabi libnewlib-arm-none-eabi libstdc++-arm-none-eabi-newlib libusb-1.0-0-dev cmake | ||
- name: compile | ||
run: | | ||
cd ${{env.WORKSPACE_DIR}} | ||
git clone -b ${{ matrix.sdk-version }} --depth 1 https://github.com/raspberrypi/pico-sdk | ||
git clone -b ${{ matrix.sdk-extras-version }} --depth 1 https://github.com/raspberrypi/pico-extras | ||
cd pico-sdk | ||
git submodule update --init | ||
cd .. | ||
export PICO_SDK_PATH="$(pwd)/pico-sdk" | ||
export PICO_SDK_EXTRAS_PATH="$(pwd)/pico-extras" | ||
export PICO_PLATFORM="${{ matrix.board }}" | ||
cp pico-sdk/external/pico_sdk_import.cmake ./ | ||
cp pico-extras/external/pico_extras_import.cmake ./pico_extras_import_optional.cmake | ||
cd ${{env.PROJECT_DIR}} | ||
ln -sv ../../../LovyanGFX LovyanGFX | ||
mkdir -p build | ||
cd build | ||
cmake .. | ||
make -j $(nproc) | ||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,3 +4,4 @@ sdkconfig* | |
build | ||
.vs | ||
.DS_Store | ||
.directory |
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 |
---|---|---|
@@ -1,38 +1,14 @@ | ||
# CMakeLists for ESP-IDF | ||
set (LGFX_ROOT ${CMAKE_CURRENT_LIST_DIR}) | ||
|
||
set(COMPONENT_ADD_INCLUDEDIRS | ||
src | ||
) | ||
file(GLOB SRCS | ||
src/lgfx/Fonts/efont/*.c | ||
src/lgfx/Fonts/IPA/*.c | ||
src/lgfx/utility/*.c | ||
src/lgfx/v1/*.cpp | ||
src/lgfx/v1/misc/*.cpp | ||
src/lgfx/v1/panel/*.cpp | ||
src/lgfx/v1/platforms/arduino_default/*.cpp | ||
src/lgfx/v1/platforms/esp32/*.cpp | ||
src/lgfx/v1/platforms/esp32c3/*.cpp | ||
src/lgfx/v1/platforms/esp32s2/*.cpp | ||
src/lgfx/v1/platforms/esp32s3/*.cpp | ||
src/lgfx/v1/touch/*.cpp | ||
) | ||
# Espressif ESP* based boards | ||
if (DEFINED ESP_PLATFORM) | ||
include(${LGFX_ROOT}/boards.cmake/esp-idf.cmake) | ||
|
||
set(COMPONENT_SRCS ${SRCS}) | ||
# Raspberry Pi RP* based boards | ||
elseif ((DEFINED PICO_PLATFORM) OR (DEFINED PICO_BOARD)) | ||
include(${LGFX_ROOT}/boards.cmake/pico-sdk.cmake) | ||
|
||
if (IDF_VERSION_MAJOR GREATER_EQUAL 5) | ||
set(COMPONENT_REQUIRES nvs_flash efuse esp_lcd driver esp_timer) | ||
elseif ((IDF_VERSION_MAJOR EQUAL 4) AND (IDF_VERSION_MINOR GREATER 3) OR IDF_VERSION_MAJOR GREATER 4) | ||
set(COMPONENT_REQUIRES nvs_flash efuse esp_lcd) | ||
# Cannot determine boards type | ||
else() | ||
set(COMPONENT_REQUIRES nvs_flash efuse) | ||
message("Error: No platform specified") | ||
endif() | ||
|
||
|
||
### If you use arduino-esp32 components, please activate next comment line. | ||
# list(APPEND COMPONENT_REQUIRES arduino-esp32) | ||
|
||
|
||
message(STATUS "LovyanGFX use components = ${COMPONENT_REQUIRES}") | ||
|
||
register_component() |
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,38 @@ | ||
# CMakeLists for ESP-IDF | ||
|
||
set(COMPONENT_ADD_INCLUDEDIRS | ||
${LGFX_ROOT}/src | ||
) | ||
file(GLOB SRCS | ||
${LGFX_ROOT}/src/lgfx/Fonts/efont/*.c | ||
${LGFX_ROOT}/src/lgfx/Fonts/IPA/*.c | ||
${LGFX_ROOT}/src/lgfx/utility/*.c | ||
${LGFX_ROOT}/src/lgfx/v1/*.cpp | ||
${LGFX_ROOT}/src/lgfx/v1/misc/*.cpp | ||
${LGFX_ROOT}/src/lgfx/v1/panel/*.cpp | ||
${LGFX_ROOT}/src/lgfx/v1/platforms/arduino_default/*.cpp | ||
${LGFX_ROOT}/src/lgfx/v1/platforms/esp32/*.cpp | ||
${LGFX_ROOT}/src/lgfx/v1/platforms/esp32c3/*.cpp | ||
${LGFX_ROOT}/src/lgfx/v1/platforms/esp32s2/*.cpp | ||
${LGFX_ROOT}/src/lgfx/v1/platforms/esp32s3/*.cpp | ||
${LGFX_ROOT}/src/lgfx/v1/touch/*.cpp | ||
) | ||
|
||
set(COMPONENT_SRCS ${SRCS}) | ||
|
||
if (IDF_VERSION_MAJOR GREATER_EQUAL 5) | ||
set(COMPONENT_REQUIRES nvs_flash efuse esp_lcd driver esp_timer) | ||
elseif ((IDF_VERSION_MAJOR EQUAL 4) AND (IDF_VERSION_MINOR GREATER 3) OR IDF_VERSION_MAJOR GREATER 4) | ||
set(COMPONENT_REQUIRES nvs_flash efuse esp_lcd) | ||
else() | ||
set(COMPONENT_REQUIRES nvs_flash efuse) | ||
endif() | ||
|
||
|
||
### If you use arduino-esp32 components, please activate next comment line. | ||
# list(APPEND COMPONENT_REQUIRES arduino-esp32) | ||
|
||
|
||
message(STATUS "LovyanGFX use components = ${COMPONENT_REQUIRES}") | ||
|
||
register_component() |
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,50 @@ | ||
# CMakeLists for PICO SDK | ||
|
||
include(${PICO_SDK_PATH}/external/pico_sdk_import.cmake) | ||
|
||
pico_sdk_init() | ||
|
||
add_compile_definitions( | ||
USE_PICO_SDK=1 | ||
) | ||
|
||
# pico_add_library() | ||
add_library(LovyanGFX_headers INTERFACE) | ||
add_library(LovyanGFX INTERFACE) | ||
|
||
target_include_directories( | ||
LovyanGFX_headers INTERFACE | ||
src | ||
) | ||
|
||
#add_compile_definitions | ||
target_compile_definitions(LovyanGFX INTERFACE | ||
USE_PICO_SDK | ||
) | ||
|
||
file(GLOB SRCS | ||
src/lgfx/Fonts/efont/*.c | ||
src/lgfx/Fonts/IPA/*.c | ||
src/lgfx/utility/*.c | ||
src/lgfx/v1/*.cpp | ||
src/lgfx/v1/misc/*.cpp | ||
src/lgfx/v1/panel/*.cpp | ||
src/lgfx/v1/platforms/arduino_default/*.cpp | ||
src/lgfx/v1/platforms/rp2040/*.cpp | ||
src/lgfx/v1/touch/*.cpp | ||
) | ||
target_sources(LovyanGFX INTERFACE ${SRCS}) | ||
target_link_libraries(LovyanGFX INTERFACE | ||
LovyanGFX_headers | ||
pico_stdlib | ||
pico_float | ||
pico_double | ||
hardware_dma | ||
hardware_gpio | ||
hardware_spi | ||
hardware_i2c | ||
hardware_pwm | ||
) | ||
|
||
pico_enable_stdio_usb(LovyanGFX 0) | ||
pico_enable_stdio_uart(LovyanGFX 1) |
Oops, something went wrong.