interrupt.h 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. /*
  2. * Copyright (c) 2006-2021, RT-Thread Development Team
  3. *
  4. * SPDX-License-Identifier: Apache-2.0
  5. *
  6. * Change Logs:
  7. * Date Author Notes
  8. * 2018-02-08 RT-Thread the first version
  9. * 2020-03-2 Howard Su Define same regsiters as an array
  10. */
  11. #ifndef __INTERRUPT_H__
  12. #define __INTERRUPT_H__
  13. /* Max number of interruptions */
  14. #define INTERRUPTS_MAX (64)
  15. /* a group num */
  16. #define GROUP_NUM (32)
  17. /* Interrupt Source */
  18. #define NMI_INTERRUPT (0)
  19. #define UART0_INTERRUPT (1)
  20. #define UART1_INTERRUPT (2)
  21. #define UART2_INTERRUPT (3)
  22. #define OWA_INTERRUPT (5)
  23. #define CIR_INTERRUPT (6)
  24. #define TWI0_INTERRUPT (7)
  25. #define TWI1_INTERRUPT (8)
  26. #define TWI2_INTERRUPT (9)
  27. #define SPI0_INTERRUPT (10)
  28. #define SPI1_INTERRUPT (11)
  29. #define TIMER0_INTERRUPT (13)
  30. #define TIMER1_INTERRUPT (14)
  31. #define TIMER2_INTERRUPT (15)
  32. #define WATCHDOG_INTERRUPT (16)
  33. #define RSB_INTERRUPT (17)
  34. #define DMA_INTERRUPT (18)
  35. #define TOUCHPANEL_INTERRUPT (20)
  36. #define AUDIOCODEC_INTERRUPT (21)
  37. #define KEYADC_INTERRUPT (22)
  38. #define SDC0_INTERRUPT (23)
  39. #define SDC1_INTERRUPT (24)
  40. #define USB_OTG_INTERRUPT (26)
  41. #define TVD_INTERRUPT (27)
  42. #define TVE_INTERRUPT (28)
  43. #define TCON_INTERRUPT (29)
  44. #define DE_FE_INTERRUPT (30)
  45. #define DE_BE_INTERRUPT (31)
  46. #define CSI_INTERRUPT (32)
  47. #define DE_INTERLACER_INTERRUPT (33)
  48. #define VE_INTERRUPT (34)
  49. #define DAUDIO_INTERRUPT (35)
  50. #define PIOD_INTERRUPT (38)
  51. #define PIOE_INTERRUPT (39)
  52. #define PIOF_INTERRUPT (40)
  53. /* intc register address */
  54. #define INTC_BASE_ADDR (0x01C20400)
  55. struct tina_intc
  56. {
  57. volatile rt_uint32_t vector_reg; /* 0x00 */
  58. volatile rt_uint32_t base_addr_reg; /* 0x04 */
  59. volatile rt_uint32_t reserved0;
  60. volatile rt_uint32_t nmi_ctrl_reg; /* 0x0C */
  61. volatile rt_uint32_t pend_reg[2]; /* 0x10, 0x14 */
  62. volatile rt_uint32_t reserved1[2];
  63. volatile rt_uint32_t en_reg[2]; /* 0x20, 0x24 */
  64. volatile rt_uint32_t reserved2[2];
  65. volatile rt_uint32_t mask_reg[2]; /* 0x30, 0x34 */
  66. volatile rt_uint32_t reserved3[2];
  67. volatile rt_uint32_t resp_reg[2]; /* 0x40, 0x44 */
  68. volatile rt_uint32_t reserved4[2];
  69. volatile rt_uint32_t ff_reg[2]; /* 0x50, 0x54 */
  70. volatile rt_uint32_t reserved5[2];
  71. volatile rt_uint32_t prio_reg[4]; /* 0x60 - 0x6c */
  72. } ;
  73. typedef struct tina_intc *tina_intc_t;
  74. #define INTC ((tina_intc_t)INTC_BASE_ADDR)
  75. #endif /* __INTERRUPT_H__ */