diff --git a/cpu/esp32/vendor/xtensa/xtensa_intr.c b/cpu/esp32/vendor/xtensa/xtensa_intr.c index 472887609f..b1fb19685b 100644 --- a/cpu/esp32/vendor/xtensa/xtensa_intr.c +++ b/cpu/esp32/vendor/xtensa/xtensa_intr.c @@ -112,9 +112,9 @@ xt_handler xt_set_interrupt_handler(int n, xt_handler f, void * arg) if( Xthal_intlevel[n] > XCHAL_EXCM_LEVEL ) return 0; /* priority level too high to safely handle in C */ - #ifdef SDK_USED - // for compatibility reasons with SDK, we use _xtos_interrupt_table - // in reverse order + #ifdef MODULE_ESP_SDK + /* for compatibility reasons with SDK, we use _xtos_interrupt_table */ + /* in reverse order */ entry = _xt_interrupt_table + (XCHAL_NUM_INTERRUPTS - n); #else entry = _xt_interrupt_table + n; diff --git a/cpu/esp32/vendor/xtensa/xtensa_intr_asm.S b/cpu/esp32/vendor/xtensa/xtensa_intr_asm.S index 651de96841..7230ed0287 100644 --- a/cpu/esp32/vendor/xtensa/xtensa_intr_asm.S +++ b/cpu/esp32/vendor/xtensa/xtensa_intr_asm.S @@ -66,7 +66,7 @@ _xt_vpri_mask: .word 0xFFFFFFFF /* Virtual priority mask */ in SDK we use _xtos_interrupt_table_ which is provided as symbol _xt_interrupt_table_ by ld script */ -#ifdef SDK_NOT_USED +#ifndef MODULE_ESP_SDK .data .global _xt_interrupt_table .align 8 diff --git a/cpu/esp32/vendor/xtensa/xtensa_vectors.S b/cpu/esp32/vendor/xtensa/xtensa_vectors.S index cefda2f5e9..f669d22300 100644 --- a/cpu/esp32/vendor/xtensa/xtensa_vectors.S +++ b/cpu/esp32/vendor/xtensa/xtensa_vectors.S @@ -219,13 +219,13 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. movi a3, XT_TIMER_INTEN /* a3 = timer interrupt bit */ wsr a4, INTCLEAR /* clear sw or edge-triggered interrupt */ - #ifndef RIOT_VERSION /* we use it as hardware timer in RIOT OS */ + #ifndef RIOT_VERSION /* we use it as hardware timer in RIOT OS */ beq a3, a4, 7f /* if timer interrupt then skip table */ #endif find_ms_setbit a3, a4, a3, 0 /* a3 = interrupt number */ -#if SDK_USED /* _xtos_interrupt_table is in reverse order */ +#if MODULE_ESP_SDK /* _xtos_interrupt_table is in reverse order */ movi a4, XCHAL_NUM_INTERRUPTS /* intnum = XCHAL_NUM_INTERRUPTS - intnum */ sub a3, a4, a3 #endif