From 59e94c9dc890c3600f4c5277c7afca3f51ce1658 Mon Sep 17 00:00:00 2001 From: KLASSENTS Date: Mon, 3 Feb 2025 12:36:47 +0700 Subject: [PATCH] =?UTF-8?q?=D0=B4=D0=BE=D0=B1=D0=B0=D0=B2=D0=BB=D0=B5?= =?UTF-8?q?=D0=BD=D0=BE=20=D0=BE=D0=B1=D1=80=D0=B0=D0=B1=D0=BE=D1=82=D0=BA?= =?UTF-8?q?=D1=83=20=D0=BD=D1=83=D0=BB=D0=B5=D0=B2=D0=BE=D0=B3=D0=BE=20i2c?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cores/arduino/trap_handler.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/cores/arduino/trap_handler.c b/cores/arduino/trap_handler.c index 3010ac2..5754182 100644 --- a/cores/arduino/trap_handler.c +++ b/cores/arduino/trap_handler.c @@ -5,7 +5,7 @@ extern void serial_interrupt_handler(uint8_t uartNumInt); extern void gpio_interrupt_handler(void); extern void tone_interrupt_handler(void); -void __attribute__((weak)) wire_interrupt_handler(void) +void __attribute__((weak)) wire_interrupt_handler(uint8_t num) { // dummy function for case when wire library is not in use } @@ -70,9 +70,12 @@ void __attribute__((noinline, section(".ram_text"), optimize("O3"))) trap_handle if (EPIC_CHECK_UART_1()) serial_interrupt_handler(1); - // i2c interrupt + // i2c0 interrupt + if (EPIC_CHECK_I2C_0()) + wire_interrupt_handler(0); + if (EPIC_CHECK_I2C_1()) - wire_interrupt_handler(); + wire_interrupt_handler(1); // reset all interrupts EPIC_CLEAR_ALL();