moves tx_timer_interrupt to threadx port

This commit is contained in:
2026-02-01 18:56:40 +01:00
parent 0766ba2aee
commit 3ee8f6d230
3 changed files with 7 additions and 6 deletions

View File

@@ -1,9 +1,9 @@
#include "hwtimer.h"
#include "riscv-traps.h"
#include <stdint.h>
#include <stdio.h>
#include <tx_api.h>
#include <tx_port.h>
#include <stdio.h>
#include "riscv-traps.h"
#if __riscv_xlen == 64
#define INTERRUPT_BIT 0x8000000000000000ull
@@ -33,6 +33,9 @@ void trap_handler(uintptr_t mcause, uintptr_t mepc, uintptr_t mtval) {
unsigned irq_id = mcause&(__riscv_xlen-1);
switch(irq_id){
case RISCV_INT_MTI:
#ifdef NX_DEBUG
printf("Timer interrupt being handled (pc=%lx)\n", mepc);
#endif
hwtimer_handler();
_tx_timer_interrupt();
break;