rt_interrupt.h 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. /*
  2. * Copyright (c) 2006-2023, RT-Thread Development Team
  3. *
  4. * SPDX-License-Identifier: Apache-2.0
  5. *
  6. * Change Logs:
  7. * Date Author Notes
  8. * 2021-10-19 JasonHu first version
  9. */
  10. #ifndef __INTERRUPT_H__
  11. #define __INTERRUPT_H__
  12. #include <rthw.h>
  13. #define NR_CPUS 1
  14. #define IRQ_OFFSET 16
  15. #ifndef IRQ_MAX_NR
  16. #define IRQ_MAX_NR 207
  17. #endif
  18. #define INTERRUPTS_MAX (IRQ_OFFSET + IRQ_MAX_NR)
  19. enum {
  20. EP_INSTRUCTION_ADDRESS_MISALIGNED = 0,
  21. EP_INSTRUCTION_ACCESS_FAULT,
  22. EP_ILLEGAL_INSTRUCTION,
  23. EP_BREAKPOINT,
  24. EP_LOAD_ADDRESS_MISALIGNED,
  25. EP_LOAD_ACCESS_FAULT,
  26. EP_STORE_ADDRESS_MISALIGNED,
  27. EP_STORE_ACCESS_FAULT,
  28. EP_ENVIRONMENT_CALL_U_MODE,
  29. EP_ENVIRONMENT_CALL_S_MODE,
  30. EP_RESERVED10,
  31. EP_ENVIRONMENT_CALL_M_MODE,
  32. EP_INSTRUCTION_PAGE_FAULT, /* page attr */
  33. EP_LOAD_PAGE_FAULT, /* read data */
  34. EP_RESERVED14,
  35. EP_STORE_PAGE_FAULT, /* write data */
  36. };
  37. void rt_hw_interrupt_init(void);
  38. void rt_hw_interrupt_mask(int vector);
  39. void rt_hw_interrupt_umask(int vector);
  40. rt_isr_handler_t rt_hw_interrupt_install(int vector, rt_isr_handler_t handler, void *param, const char *name);
  41. #endif