guo ecf2d82159
sync branch rt-smart. (#6641)
* Synchronize the code of the rt mart branch to the master branch.
  * TTY device
  * Add lwP code from rt-smart
  * Add vnode in DFS, but DFS will be re-write for rt-smart
  * There are three libcpu for rt-smart:
    * arm/cortex-a, arm/aarch64
    * riscv64

Co-authored-by: Rbb666 <zhangbingru@rt-thread.com>
Co-authored-by: zhkag <zhkag@foxmail.com>
2022-12-03 12:07:44 +08:00

32 lines
583 B
C

#include <stdint.h>
#include <hal_interrupt.h>
#include <hal_intc.h>
#include "intc.h"
static irqreturn_t intc_dispatcher(int dev, void *arg)
{
interrupt_entry();
return IRQ_HANDLED;
}
hal_intc_status_t hal_intc_init(uint32_t irq_no)
{
hal_intc_status_t ret = HAL_INTC_STATUS_OK;
/* initialize interrupt manager */
interrupt_init();
/* register intc main dispatcher handler */
if (request_irq(irq_no, intc_dispatcher, 0, NULL, NULL) < 0) {
ret = HAL_INTC_STATUS_FAIL;
goto end;
}
enable_irq(irq_no);
end:
return ret;
}