Skip to content

Commit

Permalink
remove git submodule esp32-camera and add to main repository.
Browse files Browse the repository at this point in the history
  • Loading branch information
clausqr committed Sep 7, 2023
1 parent abf4e2e commit 871cfb9
Show file tree
Hide file tree
Showing 96 changed files with 21,727 additions and 5 deletions.
4 changes: 0 additions & 4 deletions .gitmodules

This file was deleted.

1 change: 0 additions & 1 deletion lib/esp32-camera
Submodule esp32-camera deleted from 1d386b
57 changes: 57 additions & 0 deletions lib/esp32-camera/.github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: Build examples
on:
push:
branches:
- master
pull_request:

jobs:
build-examples:
name: Build for ${{ matrix.idf_target }} on ${{ matrix.idf_ver }}
runs-on: ubuntu-latest
strategy:
matrix:
idf_ver: ["release-v4.1", "release-v4.2", "release-v4.3"]
idf_target: ["esp32", "esp32s2"]
exclude:
- idf_ver: "release-v4.1"
idf_target: esp32s2 # ESP32S2 support started with version 4.2
container: espressif/idf:${{ matrix.idf_ver }}
steps:
- uses: actions/checkout@v1
with:
submodules: 'true'
- name: esp-idf build
env:
IDF_TARGET: ${{ matrix.idf_target }}
shell: bash
working-directory: examples
run: |
. ${IDF_PATH}/export.sh
idf.py build
build-examples-pedantic:
name: Build for ${{ matrix.idf_target }} on ${{ matrix.idf_ver }}
runs-on: ubuntu-latest
strategy:
matrix:
idf_ver: ["release-v4.4", "release-v5.0", "release-v5.1", "latest"]
idf_target: ["esp32", "esp32s2", "esp32s3", "esp32c2", "esp32c3"]
exclude:
- idf_ver: "release-v4.4"
idf_target: esp32c2 # ESP32C2 support started with version 5.0
container: espressif/idf:${{ matrix.idf_ver }}
steps:
- uses: actions/checkout@v1
with:
submodules: 'true'
- name: esp-idf build
env:
IDF_TARGET: ${{ matrix.idf_target }}
shell: bash
working-directory: examples
run: |
. ${IDF_PATH}/export.sh
export PEDANTIC_FLAGS="-DIDF_CI_BUILD -Werror -Werror=deprecated-declarations -Werror=unused-variable -Werror=unused-but-set-variable -Werror=unused-function"
export EXTRA_CFLAGS="${PEDANTIC_FLAGS} -Wstrict-prototypes"
export EXTRA_CXXFLAGS="${PEDANTIC_FLAGS}"
idf.py build
27 changes: 27 additions & 0 deletions lib/esp32-camera/.github/workflows/stale.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# This workflow warns and then closes issues and PRs that have had no activity for a specified amount of time.
#
# You can adjust the behavior by modifying this file.
# For more information, see:
# https://github.com/actions/stale
name: Mark stale issues and pull requests

on:
schedule:
- cron: '20 9 * * *'

jobs:
stale:

runs-on: ubuntu-latest
permissions:
issues: write
pull-requests: write

steps:
- uses: actions/stale@v3
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
stale-issue-message: 'This issue appears to be stale. Please close it if its no longer valid.'
stale-pr-message: 'This pull request appears to be stale. Please close it if its no longer valid.'
stale-issue-label: 'no-issue-activity'
stale-pr-label: 'no-pr-activity'
19 changes: 19 additions & 0 deletions lib/esp32-camera/.github/workflows/upload_component.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Push component to https://components.espressif.com
on:
push:
tags:
- v*
jobs:
upload_components:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
with:
submodules: "recursive"
- name: Upload component to the component registry
uses: espressif/github-actions/upload_components@master
with:
name: "esp32-camera"
namespace: "espressif"
version: ${{ github.ref_name }}
api_token: ${{ secrets.IDF_COMPONENT_API_TOKEN }}
6 changes: 6 additions & 0 deletions lib/esp32-camera/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
*.DS_Store
.vscode
**/build
**/sdkconfig
**/sdkconfig.old
**/dependencies.lock
98 changes: 98 additions & 0 deletions lib/esp32-camera/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
# get IDF version for comparison
set(idf_version "${IDF_VERSION_MAJOR}.${IDF_VERSION_MINOR}")

# set conversion sources
set(COMPONENT_SRCS
conversions/yuv.c
conversions/to_jpg.cpp
conversions/to_bmp.c
conversions/jpge.cpp
conversions/esp_jpg_decode.c
)

set(COMPONENT_PRIV_INCLUDEDIRS
conversions/private_include
)

set(COMPONENT_ADD_INCLUDEDIRS
driver/include
conversions/include
)

set(COMPONENT_REQUIRES driver)

# set driver sources only for supported platforms
if(IDF_TARGET STREQUAL "esp32" OR IDF_TARGET STREQUAL "esp32s2" OR IDF_TARGET STREQUAL "esp32s3")
list(APPEND COMPONENT_SRCS
driver/esp_camera.c
driver/cam_hal.c
driver/sccb.c
driver/sensor.c
sensors/ov2640.c
sensors/ov3660.c
sensors/ov5640.c
sensors/ov7725.c
sensors/ov7670.c
sensors/nt99141.c
sensors/gc0308.c
sensors/gc2145.c
sensors/gc032a.c
sensors/bf3005.c
sensors/bf20a6.c
sensors/sc101iot.c
sensors/sc030iot.c
sensors/sc031gs.c
)

list(APPEND COMPONENT_PRIV_INCLUDEDIRS
driver/private_include
sensors/private_include
target/private_include
)

if(IDF_TARGET STREQUAL "esp32")
list(APPEND COMPONENT_SRCS
target/xclk.c
target/esp32/ll_cam.c
)
endif()

if(IDF_TARGET STREQUAL "esp32s2")
list(APPEND COMPONENT_SRCS
target/xclk.c
target/esp32s2/ll_cam.c
target/tjpgd.c
)

list(APPEND COMPONENT_PRIV_INCLUDEDIRS
target/esp32s2/private_include
)
endif()

if(IDF_TARGET STREQUAL "esp32s3")
list(APPEND COMPONENT_SRCS
target/esp32s3/ll_cam.c
)
endif()

set(COMPONENT_PRIV_REQUIRES freertos nvs_flash)

set(min_version_for_esp_timer "4.2")
if (idf_version VERSION_GREATER_EQUAL min_version_for_esp_timer)
list(APPEND COMPONENT_PRIV_REQUIRES esp_timer)
endif()

endif()

# CONFIG_ESP_ROM_HAS_JPEG_DECODE is available from IDF v4.4 but
# previous IDF supported chips already support JPEG decoder, hence okay to use this
if(idf_version VERSION_GREATER_EQUAL "4.4" AND NOT CONFIG_ESP_ROM_HAS_JPEG_DECODE)
list(APPEND COMPONENT_SRCS
target/tjpgd.c
)
list(APPEND COMPONENT_PRIV_INCLUDEDIRS
target/jpeg_include/
)
endif()

register_component()
Loading

0 comments on commit 871cfb9

Please sign in to comment.