1
0

cmsis.h 7.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160
  1. /*
  2. * @brief Basic CMSIS include file
  3. *
  4. * @note
  5. * Copyright(C) NXP Semiconductors, 2013
  6. * All rights reserved.
  7. *
  8. * @par
  9. * Software that is described herein is for illustrative purposes only
  10. * which provides customers with programming information regarding the
  11. * LPC products. This software is supplied "AS IS" without any warranties of
  12. * any kind, and NXP Semiconductors and its licensor disclaim any and
  13. * all warranties, express or implied, including all implied warranties of
  14. * merchantability, fitness for a particular purpose and non-infringement of
  15. * intellectual property rights. NXP Semiconductors assumes no responsibility
  16. * or liability for the use of the software, conveys no license or rights under any
  17. * patent, copyright, mask work right, or any other intellectual property rights in
  18. * or to any products. NXP Semiconductors reserves the right to make changes
  19. * in the software without notification. NXP Semiconductors also makes no
  20. * representation or warranty that such application will be suitable for the
  21. * specified use without further testing or modification.
  22. *
  23. * @par
  24. * Permission to use, copy, modify, and distribute this software and its
  25. * documentation is hereby granted, under NXP Semiconductors' and its
  26. * licensor's relevant copyrights in the software, without fee, provided that it
  27. * is used in conjunction with NXP Semiconductors microcontrollers. This
  28. * copyright, permission, and disclaimer notice must appear in all copies of
  29. * this code.
  30. */
  31. #ifndef __CMSIS_H_
  32. #define __CMSIS_H_
  33. #include "lpc_types.h"
  34. // >>> system config
  35. #define CHIP_LPC8XX
  36. #define CHIP_LPC82X
  37. // <<<
  38. #ifdef __cplusplus
  39. extern "C" {
  40. #endif
  41. /** @defgroup CMSIS_8XX_ALL CHIP: LPC8xx CMSIS include file
  42. * @ingroup CHIP_8XX_Drivers
  43. * @{
  44. */
  45. #if defined(__ARMCC_VERSION)
  46. // Kill warning "#pragma push with no matching #pragma pop"
  47. #pragma diag_suppress 2525
  48. #pragma push
  49. #pragma anon_unions
  50. #elif defined(__CWCC__)
  51. #pragma push
  52. #pragma cpp_extensions on
  53. #elif defined(__GNUC__)
  54. /* anonymous unions are enabled by default */
  55. #elif defined(__IAR_SYSTEMS_ICC__)
  56. // #pragma push // FIXME not usable for IAR
  57. #pragma language=extended
  58. #else
  59. #error Not supported compiler type
  60. #endif
  61. #if !defined(CORE_M0PLUS)
  62. #error Please #define CORE_M0PLUS
  63. #endif
  64. /** @defgroup CMSIS_8XX CHIP: LPC8xx Cortex CMSIS definitions
  65. * @ingroup CMSIS_8XX_ALL
  66. * @{
  67. */
  68. /* Configuration of the Cortex-M0+ Processor and Core Peripherals */
  69. #define __CM0PLUS_REV 0x0001 /*!< Cortex-M0+ Core Revision */
  70. #define __MPU_PRESENT 0 /*!< MPU present or not */
  71. #define __VTOR_PRESENT 1 /*!< VTOR is present in this implementation */
  72. #define __NVIC_PRIO_BITS 2 /*!< Number of Bits used for Priority Levels */
  73. #define __Vendor_SysTickConfig 0 /*!< Set to 1 if different SysTick Config is used */
  74. /**
  75. * @}
  76. */
  77. /** @defgroup CMSIS_8XX_IRQ CHIP: LPC8xx peripheral interrupt numbers
  78. * @ingroup CMSIS_8XX_ALL
  79. * @{
  80. */
  81. typedef enum {
  82. /****** Cortex-M0 Processor Exceptions Numbers ***************************************************/
  83. Reset_IRQn = -15, /*!< 1 Reset Vector, invoked on Power up and warm reset */
  84. NonMaskableInt_IRQn = -14, /*!< 2 Non Maskable Interrupt */
  85. HardFault_IRQn = -13, /*!< 3 Cortex-M0 Hard Fault Interrupt */
  86. SVCall_IRQn = -5, /*!< 11 Cortex-M0 SV Call Interrupt */
  87. PendSV_IRQn = -2, /*!< 14 Cortex-M0 Pend SV Interrupt */
  88. SysTick_IRQn = -1, /*!< 15 Cortex-M0 System Tick Interrupt */
  89. /****** LPC8xx Specific Interrupt Numbers ********************************************************/
  90. SPI0_IRQn = 0, /*!< SPI0 */
  91. SPI1_IRQn = 1, /*!< SPI1 */
  92. Reserved0_IRQn = 2, /*!< Reserved Interrupt */
  93. UART0_IRQn = 3, /*!< USART0 */
  94. UART1_IRQn = 4, /*!< USART1 */
  95. UART2_IRQn = 5, /*!< USART2 */
  96. Reserved1_IRQn = 6, /*!< Reserved Interrupt */
  97. I2C1_IRQn = 7, /*!< I2C1 */
  98. I2C0_IRQn = 8, /*!< I2C0 */
  99. I2C_IRQn = 8, /*!< Alias for I2C0 */
  100. SCT_IRQn = 9, /*!< SCT */
  101. MRT_IRQn = 10, /*!< MRT */
  102. CMP_IRQn = 11, /*!< CMP */
  103. WDT_IRQn = 12, /*!< WDT */
  104. BOD_IRQn = 13, /*!< BOD */
  105. FLASH_IRQn = 14, /*!< Flash interrupt */
  106. WKT_IRQn = 15, /*!< WKT Interrupt */
  107. ADC_SEQA_IRQn = 16, /*!< ADC sequence A completion */
  108. ADC_SEQB_IRQn = 17, /*!< ADC sequence B completion */
  109. ADC_THCMP_IRQn = 18, /*!< ADC threshold compare */
  110. ADC_OVR_IRQn = 19, /*!< ADC overrun */
  111. DMA_IRQn = 20, /*!< Reserved Interrupt */
  112. I2C2_IRQn = 21, /*!< Reserved Interrupt */
  113. I2C3_IRQn = 22, /*!< Reserved Interrupt */
  114. Reserved2_IRQn = 23, /*!< Reserved Interrupt */
  115. PININT0_IRQn = 24, /*!< External Interrupt 0 */
  116. PIN_INT0_IRQn = 24, /*!< External Interrupt 0 (alias) */
  117. PININT1_IRQn = 25, /*!< External Interrupt 1 */
  118. PIN_INT1_IRQn = 25, /*!< External Interrupt 1 (alias) */
  119. PININT2_IRQn = 26, /*!< External Interrupt 2 */
  120. PIN_INT2_IRQn = 26, /*!< External Interrupt 2 (alias) */
  121. PININT3_IRQn = 27, /*!< External Interrupt 3 */
  122. PIN_INT3_IRQn = 27, /*!< External Interrupt 3 (alias) */
  123. PININT4_IRQn = 28, /*!< External Interrupt 4 */
  124. PIN_INT4_IRQn = 28, /*!< External Interrupt 4 (alias) */
  125. PININT5_IRQn = 29, /*!< External Interrupt 5 */
  126. PIN_INT5_IRQn = 29, /*!< External Interrupt 5 (alias) */
  127. PININT6_IRQn = 30, /*!< External Interrupt 6 */
  128. PIN_INT6_IRQn = 30, /*!< External Interrupt 6 (alias) */
  129. PININT7_IRQn = 31, /*!< External Interrupt 7 */
  130. PIN_INT7_IRQn = 31, /*!< External Interrupt 7 (alias) */
  131. } IRQn_Type;
  132. /**
  133. * @}
  134. */
  135. #include "core_cm0plus.h" /*!< Cortex-M0+ processor and core peripherals */
  136. /**
  137. * @}
  138. */
  139. #ifdef __cplusplus
  140. }
  141. #endif
  142. #endif /* __CMSIS_H_ */