mirror of
https://github.com/espressif/esp-idf.git
synced 2025-12-28 21:55:59 +00:00
Merge branch 'refactor/split_jpeg_hal' into 'master'
refactor(jpeg): Split hal layer for jpeg Closes IDF-14084 See merge request espressif/esp-idf!43028
This commit is contained in:
@@ -23,6 +23,7 @@ if(CONFIG_SOC_JPEG_CODEC_SUPPORTED)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
set(requires esp_hal_jpeg)
|
||||
if(${target} STREQUAL "linux")
|
||||
set(priv_requires "")
|
||||
else()
|
||||
@@ -32,4 +33,5 @@ endif()
|
||||
idf_component_register(SRCS ${srcs}
|
||||
INCLUDE_DIRS ${public_include}
|
||||
PRIV_REQUIRES "${priv_requires}"
|
||||
REQUIRES "${requires}"
|
||||
)
|
||||
|
||||
20
components/esp_hal_jpeg/CMakeLists.txt
Normal file
20
components/esp_hal_jpeg/CMakeLists.txt
Normal file
@@ -0,0 +1,20 @@
|
||||
idf_build_get_property(target IDF_TARGET)
|
||||
if(${target} STREQUAL "linux")
|
||||
return() # This component is not supported by the POSIX/Linux simulator
|
||||
endif()
|
||||
|
||||
if(EXISTS "${CMAKE_CURRENT_LIST_DIR}/${target}/include")
|
||||
list(APPEND includes "${target}/include")
|
||||
endif()
|
||||
list(APPEND includes "include")
|
||||
|
||||
set(srcs)
|
||||
|
||||
# JPEG related source files
|
||||
if(CONFIG_SOC_JPEG_CODEC_SUPPORTED)
|
||||
list(APPEND srcs "jpeg_hal.c")
|
||||
endif()
|
||||
|
||||
idf_component_register(SRCS ${srcs}
|
||||
INCLUDE_DIRS ${includes}
|
||||
REQUIRES soc hal)
|
||||
9
components/esp_hal_jpeg/README.md
Normal file
9
components/esp_hal_jpeg/README.md
Normal file
@@ -0,0 +1,9 @@
|
||||
# `esp_hal_jpeg`
|
||||
|
||||
⚠️ This HAL component is still under heavy development at the moment, so we don't guarantee the stability and backward-compatibility among versions.
|
||||
|
||||
The `esp_hal_jpeg` component provides a **Hardware Abstraction Layer** of JPEG for all targets supported by ESP-IDF.
|
||||
|
||||
In a broad sense, the HAL layer consists of two sub-layers: HAL (upper) and Low-Level(bottom). The HAL layer defines the steps and data that is required to operate a peripheral (e.g. initialization, parameter settings). The low-level is a translation layer above the register files under the `soc` component, it only covers general conceptions to register configurations.
|
||||
|
||||
The functions in this file mainly provide hardware abstraction for IDF peripheral drivers. For advanced developers, the HAL layer functions can also be directly used to assist in implementing their own drivers. However, it needs to be mentioned again that the interfaces here do not guarantee stability.
|
||||
@@ -67,7 +67,6 @@ typedef enum {
|
||||
JPEG_LL_INTR_UNDETECT | \
|
||||
JPEG_LL_INTR_DECODE_TIMEOUT)
|
||||
|
||||
|
||||
typedef enum {
|
||||
JPEG_LL_RLE_PARALLEL_ERR = (1 << 1),
|
||||
JPEG_LL_BS_LAST_BLOCK_EOF = (1 << 12),
|
||||
@@ -437,7 +436,6 @@ static inline void jpeg_ll_codec_pause(jpeg_dev_t *hw, bool en)
|
||||
hw->config.pause_en = en;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @brief Apply soft reset, this will reset the hardware fsm and fifo.
|
||||
*
|
||||
@@ -82,6 +82,7 @@ else()
|
||||
esp_hal_wdt
|
||||
esp_hal_lcd
|
||||
esp_hal_mcpwm
|
||||
esp_hal_jpeg
|
||||
LDFRAGMENTS "linker.lf" "app.lf")
|
||||
add_subdirectory(port)
|
||||
|
||||
|
||||
@@ -184,10 +184,6 @@ elseif(NOT BOOTLOADER_BUILD)
|
||||
list(APPEND srcs "vbat_hal.c")
|
||||
endif()
|
||||
|
||||
if(CONFIG_SOC_JPEG_CODEC_SUPPORTED)
|
||||
list(APPEND srcs "jpeg_hal.c")
|
||||
endif()
|
||||
|
||||
if(CONFIG_SOC_PPA_SUPPORTED)
|
||||
list(APPEND srcs "ppa_hal.c")
|
||||
endif()
|
||||
|
||||
@@ -166,6 +166,7 @@ INPUT = \
|
||||
$(PROJECT_PATH)/components/esp_event/include/esp_event.h \
|
||||
$(PROJECT_PATH)/components/esp_hal_timg/include/hal/timer_types.h \
|
||||
$(PROJECT_PATH)/components/esp_hal_i2c/include/hal/i2c_types.h \
|
||||
$(PROJECT_PATH)/components/esp_hal_jpeg/include/hal/jpeg_types.h \
|
||||
$(PROJECT_PATH)/components/esp_hal_lcd/include/hal/lcd_types.h \
|
||||
$(PROJECT_PATH)/components/esp_hal_mspi/include/hal/esp_flash_err.h \
|
||||
$(PROJECT_PATH)/components/esp_hal_mspi/include/hal/spi_flash_types.h \
|
||||
|
||||
@@ -21,7 +21,6 @@ INPUT += \
|
||||
$(PROJECT_PATH)/components/esp_driver_cam/csi/include/esp_cam_ctlr_csi.h \
|
||||
$(PROJECT_PATH)/components/esp_driver_cam/isp_dvp/include/esp_cam_ctlr_isp_dvp.h \
|
||||
$(PROJECT_PATH)/components/hal/include/hal/isp_types.h \
|
||||
$(PROJECT_PATH)/components/hal/include/hal/jpeg_types.h \
|
||||
$(PROJECT_PATH)/components/hal/include/hal/ppa_types.h \
|
||||
$(PROJECT_PATH)/components/esp_driver_touch_sens/include/driver/touch_sens.h \
|
||||
$(PROJECT_PATH)/components/esp_driver_touch_sens/include/driver/touch_sens_types.h \
|
||||
|
||||
@@ -465,4 +465,4 @@ API Reference
|
||||
.. include-build-file:: inc/jpeg_encode.inc
|
||||
|
||||
.. include-build-file:: inc/components/esp_driver_jpeg/include/driver/jpeg_types.inc
|
||||
.. include-build-file:: inc/components/hal/include/hal/jpeg_types.inc
|
||||
.. include-build-file:: inc/components/esp_hal_jpeg/include/hal/jpeg_types.inc
|
||||
|
||||
@@ -465,4 +465,4 @@ API 参考
|
||||
.. include-build-file:: inc/jpeg_encode.inc
|
||||
|
||||
.. include-build-file:: inc/components/esp_driver_jpeg/include/driver/jpeg_types.inc
|
||||
.. include-build-file:: inc/components/hal/include/hal/jpeg_types.inc
|
||||
.. include-build-file:: inc/components/esp_hal_jpeg/include/hal/jpeg_types.inc
|
||||
|
||||
Reference in New Issue
Block a user