board.h 3.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. /*
  2. * File : board.h
  3. * This file is part of RT-Thread RTOS
  4. * COPYRIGHT (C) 2012, RT-Thread Development Team
  5. *
  6. * The license and distribution terms for this file may be
  7. * found in the file LICENSE in this distribution or at
  8. * http://www.rt-thread.org/license/LICENSE
  9. *
  10. * Change Logs:
  11. * Date Author Notes
  12. * 2012-02-13 mojingxian first version
  13. */
  14. #ifndef _BOARD_H_
  15. #define _BOARD_H_
  16. #define CLKIN 33333000LL
  17. #define SPEED_MULTIPLE 16
  18. #define BUS_DIVISOR 4
  19. #define CCLKSPEED (CLKIN * SPEED_MULTIPLE)
  20. #define SCLKSPEED (CLKIN * BUS_DIVISOR)
  21. #define CLOCKS_PER_SECD CCLKSPEED
  22. #define SCLOCKS_PER_SEC SCLKSPEED
  23. //SIC_IMASK¼Ä´æÆ÷
  24. #define PLL_WAKEUP_INT_MASK 0x00000001
  25. #define DMA_ERROR_INT_MASK 0x00000002
  26. #define PPI_ERROR_INT_MASK 0x00000004
  27. #define SPORT0_ERROR_INT_MASK 0x00000008
  28. #define SPORT1_ERROR_INT_MASK 0x00000010
  29. #define SPI_ERROR_INT_MASK 0x00000020
  30. #define UART_ERROR_INT_MASK 0x00000040
  31. #define RTC_INT_MASK 0x00000080
  32. #define DMA0_PPI_INT_MASK 0x00000100
  33. #define DMA1_SPORT0_RX_INT_MASK 0x00000200
  34. #define DMA2_SPORT0_TX_INT_MASK 0x00000400
  35. #define DMA3_SPORT1_RX_INT_MASK 0x00000800
  36. #define DMA4_SPORT1_TX_INT_MASK 0x00001000
  37. #define DMA5_SPI_INT_MASK 0x00002000
  38. #define DMA6_UART_RX_INT_MASK 0x00004000
  39. #define DMA7_UART_TX_INT_MASK 0x00008000
  40. #define TIMER0_INT_MASK 0x00010000
  41. #define TIMER1_INT_MASK 0x00020000
  42. #define TIMER2_INT_MASK 0x00040000
  43. #define PF_INTA_MASK 0x00080000
  44. #define PF_INTB_MASK 0x00100000
  45. #define MEM_DMA_STREAM0_MASK 0x00200000
  46. #define MEM_DMA_STREAM1_MASK 0x00400000
  47. #define SOFT_WATCHDOG_TMER_MASK 0x00800000
  48. //SIC_IAR0
  49. #define IAR0_PLL_WAKEUP_INT_IVG 0x00
  50. #define IAR0_DMA_ERROR_INT_IVG 0x01
  51. #define IAR0_PPI_ERROR_INT_IVG 0x02
  52. #define IAR0_SPORT0_ERROR_INT_IVG 0x03
  53. #define IAR0_SPORT1_ERROR_INT_IVG 0x04
  54. #define IAR0_SPI_ERROR_INT_IVG 0x05
  55. #define IAR0_UART_ERROR_INT_IVG 0x06
  56. #define IAR0_RTC_INT_IVG 0x07
  57. //SIC_IAR1
  58. #define IAR1_DMA0_PPI_INT_IVG 0x00
  59. #define IAR1_DMA1_SPORT0RX_IVG 0x01
  60. #define IAR1_DMA2_SPORT0TX_IVG 0x02
  61. #define IAR1_DMA3_SPORT1RX_IVG 0x03
  62. #define IAR1_DMA4_SPORT1TX_IVG 0x04
  63. #define IAR1_DMA5_SPI_INT_IVG 0x05
  64. #define IAR1_DMA6_UARTRX_IVG 0x06
  65. #define IAR1_DMA7_UARTTX_IVG 0x07
  66. //SIC_IAR2
  67. #define IAR2_TIMER0_INT_IVG 0x00
  68. #define IAR2_TIMER1_INT_IVG 0x01
  69. #define IAR2_TIMER2_INT_IVG 0x02
  70. #define IAR2_PF_A_INT_IVG 0x03
  71. #define IAR2_PF_B_INT_IVG 0x04
  72. #define IAR2_MEM_DMA_STREAM0_INT_IVG 0x05
  73. #define IAR2_MEM_DMA_STREAM1_INT_IVG 0x06
  74. #define IAR2_SWATCHDOG_TIMER_INT_IVG 0x07
  75. #ifdef __cplusplus
  76. extern "C" {
  77. #endif
  78. void rt_hw_core_timer_init(void);
  79. void rt_hw_board_init(void);
  80. void rt_hw_isr_install(void);
  81. #ifdef __cplusplus
  82. }
  83. #endif
  84. #endif /* _BSP_H_ */