feat(i2c): Add config option for i2c isr handler can put in flash

This commit is contained in:
C.S.M
2025-02-10 13:49:21 +08:00
parent 7ff0087d3b
commit 2458734108
5 changed files with 19 additions and 4 deletions
+7 -1
View File
@@ -1,5 +1,5 @@
/*
* SPDX-FileCopyrightText: 2023-2024 Espressif Systems (Shanghai) CO LTD
* SPDX-FileCopyrightText: 2023-2025 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
@@ -42,6 +42,12 @@ extern "C" {
#define LP_I2C_BUS_CLK_ATOMIC() PERIPH_RCC_ATOMIC()
#endif
#ifdef CONFIG_I2C_MASTER_ISR_HANDLER_IN_IRAM
#define I2C_MASTER_ISR_ATTR IRAM_ATTR
#else
#define I2C_MASTER_ISR_ATTR
#endif
#if CONFIG_I2C_ISR_IRAM_SAFE
#define I2C_MEM_ALLOC_CAPS (MALLOC_CAP_INTERNAL | MALLOC_CAP_8BIT)
#else