cmsis.h 7.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156
  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. #include "sys_config.h"
  35. #ifdef __cplusplus
  36. extern "C" {
  37. #endif
  38. /** @defgroup CMSIS_8XX_ALL CHIP: LPC8xx CMSIS include file
  39. * @ingroup CHIP_8XX_Drivers
  40. * @{
  41. */
  42. #if defined(__ARMCC_VERSION)
  43. // Kill warning "#pragma push with no matching #pragma pop"
  44. #pragma diag_suppress 2525
  45. #pragma push
  46. #pragma anon_unions
  47. #elif defined(__CWCC__)
  48. #pragma push
  49. #pragma cpp_extensions on
  50. #elif defined(__GNUC__)
  51. /* anonymous unions are enabled by default */
  52. #elif defined(__IAR_SYSTEMS_ICC__)
  53. // #pragma push // FIXME not usable for IAR
  54. #pragma language=extended
  55. #else
  56. #error Not supported compiler type
  57. #endif
  58. #if !defined(CORE_M0PLUS)
  59. #error Please #define CORE_M0PLUS
  60. #endif
  61. /** @defgroup CMSIS_8XX CHIP: LPC8xx Cortex CMSIS definitions
  62. * @ingroup CMSIS_8XX_ALL
  63. * @{
  64. */
  65. /* Configuration of the Cortex-M0+ Processor and Core Peripherals */
  66. #define __CM0PLUS_REV 0x0001 /*!< Cortex-M0+ Core Revision */
  67. #define __MPU_PRESENT 0 /*!< MPU present or not */
  68. #define __VTOR_PRESENT 1 /*!< VTOR is present in this implementation */
  69. #define __NVIC_PRIO_BITS 2 /*!< Number of Bits used for Priority Levels */
  70. #define __Vendor_SysTickConfig 0 /*!< Set to 1 if different SysTick Config is used */
  71. /**
  72. * @}
  73. */
  74. /** @defgroup CMSIS_8XX_IRQ CHIP: LPC8xx peripheral interrupt numbers
  75. * @ingroup CMSIS_8XX_ALL
  76. * @{
  77. */
  78. typedef enum {
  79. /****** Cortex-M0 Processor Exceptions Numbers ***************************************************/
  80. Reset_IRQn = -15, /*!< 1 Reset Vector, invoked on Power up and warm reset */
  81. NonMaskableInt_IRQn = -14, /*!< 2 Non Maskable Interrupt */
  82. HardFault_IRQn = -13, /*!< 3 Cortex-M0 Hard Fault Interrupt */
  83. SVCall_IRQn = -5, /*!< 11 Cortex-M0 SV Call Interrupt */
  84. PendSV_IRQn = -2, /*!< 14 Cortex-M0 Pend SV Interrupt */
  85. SysTick_IRQn = -1, /*!< 15 Cortex-M0 System Tick Interrupt */
  86. /****** LPC8xx Specific Interrupt Numbers ********************************************************/
  87. SPI0_IRQn = 0, /*!< SPI0 */
  88. SPI1_IRQn = 1, /*!< SPI1 */
  89. Reserved0_IRQn = 2, /*!< Reserved Interrupt */
  90. UART0_IRQn = 3, /*!< USART0 */
  91. UART1_IRQn = 4, /*!< USART1 */
  92. UART2_IRQn = 5, /*!< USART2 */
  93. Reserved1_IRQn = 6, /*!< Reserved Interrupt */
  94. I2C1_IRQn = 7, /*!< I2C1 */
  95. I2C0_IRQn = 8, /*!< I2C0 */
  96. I2C_IRQn = 8, /*!< Alias for I2C0 */
  97. SCT_IRQn = 9, /*!< SCT */
  98. MRT_IRQn = 10, /*!< MRT */
  99. CMP_IRQn = 11, /*!< CMP */
  100. WDT_IRQn = 12, /*!< WDT */
  101. BOD_IRQn = 13, /*!< BOD */
  102. FLASH_IRQn = 14, /*!< Flash interrupt */
  103. WKT_IRQn = 15, /*!< WKT Interrupt */
  104. ADC_SEQA_IRQn = 16, /*!< ADC sequence A completion */
  105. ADC_SEQB_IRQn = 17, /*!< ADC sequence B completion */
  106. ADC_THCMP_IRQn = 18, /*!< ADC threshold compare */
  107. ADC_OVR_IRQn = 19, /*!< ADC overrun */
  108. DMA_IRQn = 20, /*!< Reserved Interrupt */
  109. I2C2_IRQn = 21, /*!< Reserved Interrupt */
  110. I2C3_IRQn = 22, /*!< Reserved Interrupt */
  111. Reserved2_IRQn = 23, /*!< Reserved Interrupt */
  112. PININT0_IRQn = 24, /*!< External Interrupt 0 */
  113. PIN_INT0_IRQn = 24, /*!< External Interrupt 0 (alias) */
  114. PININT1_IRQn = 25, /*!< External Interrupt 1 */
  115. PIN_INT1_IRQn = 25, /*!< External Interrupt 1 (alias) */
  116. PININT2_IRQn = 26, /*!< External Interrupt 2 */
  117. PIN_INT2_IRQn = 26, /*!< External Interrupt 2 (alias) */
  118. PININT3_IRQn = 27, /*!< External Interrupt 3 */
  119. PIN_INT3_IRQn = 27, /*!< External Interrupt 3 (alias) */
  120. PININT4_IRQn = 28, /*!< External Interrupt 4 */
  121. PIN_INT4_IRQn = 28, /*!< External Interrupt 4 (alias) */
  122. PININT5_IRQn = 29, /*!< External Interrupt 5 */
  123. PIN_INT5_IRQn = 29, /*!< External Interrupt 5 (alias) */
  124. PININT6_IRQn = 30, /*!< External Interrupt 6 */
  125. PIN_INT6_IRQn = 30, /*!< External Interrupt 6 (alias) */
  126. PININT7_IRQn = 31, /*!< External Interrupt 7 */
  127. PIN_INT7_IRQn = 31, /*!< External Interrupt 7 (alias) */
  128. } IRQn_Type;
  129. /**
  130. * @}
  131. */
  132. #include "core_cm0plus.h" /*!< Cortex-M0+ processor and core peripherals */
  133. /**
  134. * @}
  135. */
  136. #ifdef __cplusplus
  137. }
  138. #endif
  139. #endif /* __CMSIS_H_ */