From ee4214ebf1da91954997bd7a357096882cba5cb7 Mon Sep 17 00:00:00 2001 From: wuzhenghui Date: Mon, 6 Feb 2023 21:41:33 +0800 Subject: [PATCH] rom caps: add ESP_ROM_WITHOUT_REGI2C rom caps --- components/esp_rom/CMakeLists.txt | 2 +- components/esp_rom/esp32h2/Kconfig.soc_caps.in | 4 ++++ components/esp_rom/esp32h2/esp_rom_caps.h | 3 ++- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/components/esp_rom/CMakeLists.txt b/components/esp_rom/CMakeLists.txt index 48310241ef..f5393c0617 100644 --- a/components/esp_rom/CMakeLists.txt +++ b/components/esp_rom/CMakeLists.txt @@ -22,7 +22,7 @@ else() # Override regi2c implementation in ROM - if(CONFIG_ESP_ROM_HAS_REGI2C_BUG) + if(CONFIG_ESP_ROM_HAS_REGI2C_BUG OR CONFIG_ESP_ROM_WITHOUT_REGI2C) list(APPEND sources "patches/esp_rom_regi2c_${target}.c") endif() diff --git a/components/esp_rom/esp32h2/Kconfig.soc_caps.in b/components/esp_rom/esp32h2/Kconfig.soc_caps.in index 4dd6b41307..ab763d79c9 100644 --- a/components/esp_rom/esp32h2/Kconfig.soc_caps.in +++ b/components/esp_rom/esp32h2/Kconfig.soc_caps.in @@ -46,3 +46,7 @@ config ESP_ROM_HAS_LAYOUT_TABLE config ESP_ROM_HAS_SPI_FLASH bool default y + +config ESP_ROM_WITHOUT_REGI2C + bool + default y diff --git a/components/esp_rom/esp32h2/esp_rom_caps.h b/components/esp_rom/esp32h2/esp_rom_caps.h index 1b021dea6d..19bb4d9318 100644 --- a/components/esp_rom/esp32h2/esp_rom_caps.h +++ b/components/esp_rom/esp32h2/esp_rom_caps.h @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: 2022 Espressif Systems (Shanghai) CO LTD + * SPDX-FileCopyrightText: 2022-2023 Espressif Systems (Shanghai) CO LTD * * SPDX-License-Identifier: Apache-2.0 */ @@ -17,3 +17,4 @@ #define ESP_ROM_HAS_HEAP_TLSF (1) // ROM has the implementation of the tlsf and multi-heap library #define ESP_ROM_HAS_LAYOUT_TABLE (1) // ROM has the layout table #define ESP_ROM_HAS_SPI_FLASH (1) // ROM has the implementation of SPI Flash driver +#define ESP_ROM_WITHOUT_REGI2C (1) // ROM has no regi2c APIs