Skip to content

Commit

Permalink
move {target}/rom/miniz.h to a common miniz.h
Browse files Browse the repository at this point in the history
- Move {target}/rom/miniz.h to common miniz.h
- Add ESP_ROM_HAS_MZ_CRC32 for ESP32/S2/S3/C3/H2
- Alias mz_crc32 to crc32_le if chips not support ESP_ROM_HAS_MZ_CRC32
  • Loading branch information
esp-jiangguangming committed Dec 2, 2022
1 parent 228ecfd commit af425e5
Show file tree
Hide file tree
Showing 20 changed files with 850 additions and 4,613 deletions.
4 changes: 4 additions & 0 deletions components/esp_rom/esp32/Kconfig.soc_caps.in
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ config ESP_ROM_HAS_CRC_BE
bool
default y

config ESP_ROM_HAS_MZ_CRC32
bool
default y

config ESP_ROM_HAS_JPEG_DECODE
bool
default y
Expand Down
1 change: 1 addition & 0 deletions components/esp_rom/esp32/esp_rom_caps.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,6 @@

#define ESP_ROM_HAS_CRC_LE (1) // ROM CRC library supports Little Endian
#define ESP_ROM_HAS_CRC_BE (1) // ROM CRC library supports Big Endian
#define ESP_ROM_HAS_MZ_CRC32 (1) // ROM has mz_crc32 function
#define ESP_ROM_HAS_JPEG_DECODE (1) // ROM has JPEG decode library
#define ESP_ROM_NEEDS_SWSETUP_WORKAROUND (1) // ROM uses 32-bit time_t. A workaround is required to prevent printf functions from crashing
4 changes: 4 additions & 0 deletions components/esp_rom/esp32c3/Kconfig.soc_caps.in
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ config ESP_ROM_HAS_CRC_BE
bool
default y

config ESP_ROM_HAS_MZ_CRC32
bool
default y

config ESP_ROM_HAS_JPEG_DECODE
bool
default y
Expand Down
1 change: 1 addition & 0 deletions components/esp_rom/esp32c3/esp_rom_caps.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

#define ESP_ROM_HAS_CRC_LE (1) // ROM CRC library supports Little Endian
#define ESP_ROM_HAS_CRC_BE (1) // ROM CRC library supports Big Endian
#define ESP_ROM_HAS_MZ_CRC32 (1) // ROM has mz_crc32 function
#define ESP_ROM_HAS_JPEG_DECODE (1) // ROM has JPEG decode library
#define ESP_ROM_UART_CLK_IS_XTAL (1) // UART clock source is selected to XTAL in ROM
#define ESP_ROM_USB_SERIAL_DEVICE_NUM (3) // UART uses USB_SERIAL_JTAG port in ROM.
Expand Down
4 changes: 4 additions & 0 deletions components/esp_rom/esp32h2/Kconfig.soc_caps.in
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ config ESP_ROM_HAS_CRC_BE
bool
default y

config ESP_ROM_HAS_MZ_CRC32
bool
default y

config ESP_ROM_HAS_JPEG_DECODE
bool
default y
Expand Down
1 change: 1 addition & 0 deletions components/esp_rom/esp32h2/esp_rom_caps.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

#define ESP_ROM_HAS_CRC_LE (1) // ROM CRC library supports Little Endian
#define ESP_ROM_HAS_CRC_BE (1) // ROM CRC library supports Big Endian
#define ESP_ROM_HAS_MZ_CRC32 (1) // ROM has mz_crc32 function
#define ESP_ROM_HAS_JPEG_DECODE (1) // ROM has JPEG decode library
#define ESP_ROM_UART_CLK_IS_XTAL (1) // UART clock source is selected to XTAL in ROM
#define ESP_ROM_USB_SERIAL_DEVICE_NUM (3) // UART uses USB_SERIAL_JTAG port in ROM.
Expand Down
4 changes: 4 additions & 0 deletions components/esp_rom/esp32s2/Kconfig.soc_caps.in
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ config ESP_ROM_HAS_CRC_LE
bool
default y

config ESP_ROM_HAS_MZ_CRC32
bool
default y

config ESP_ROM_NEEDS_SWSETUP_WORKAROUND
bool
default y
1 change: 1 addition & 0 deletions components/esp_rom/esp32s2/esp_rom_caps.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,5 @@
#pragma once

#define ESP_ROM_HAS_CRC_LE (1) // ROM CRC library supports Little Endian
#define ESP_ROM_HAS_MZ_CRC32 (1) // ROM has mz_crc32 function
#define ESP_ROM_NEEDS_SWSETUP_WORKAROUND (1) // ROM uses 32-bit time_t. A workaround is required to prevent printf functions from crashing
4 changes: 4 additions & 0 deletions components/esp_rom/esp32s3/Kconfig.soc_caps.in
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ config ESP_ROM_HAS_CRC_BE
bool
default y

config ESP_ROM_HAS_MZ_CRC32
bool
default y

config ESP_ROM_HAS_JPEG_DECODE
bool
default y
Expand Down
1 change: 1 addition & 0 deletions components/esp_rom/esp32s3/esp_rom_caps.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

#define ESP_ROM_HAS_CRC_LE (1) // ROM CRC library supports Little Endian
#define ESP_ROM_HAS_CRC_BE (1) // ROM CRC library supports Big Endian
#define ESP_ROM_HAS_MZ_CRC32 (1) // ROM has mz_crc32 function
#define ESP_ROM_HAS_JPEG_DECODE (1) // ROM has JPEG decode library
#define ESP_ROM_UART_CLK_IS_XTAL (1) // UART clock source is selected to XTAL in ROM
#define ESP_ROM_HAS_RETARGETABLE_LOCKING (1) // ROM was built with retargetable locking
Expand Down
799 changes: 8 additions & 791 deletions components/esp_rom/include/esp32/rom/miniz.h

Large diffs are not rendered by default.

Loading

0 comments on commit af425e5

Please sign in to comment.