ARMCM0plus.h 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127
  1. /**************************************************************************//**
  2. * @file ARMCM0plus.h
  3. * @brief CMSIS Core Peripheral Access Layer Header File for
  4. * ARMCM0plus Device
  5. * @version V5.3.2
  6. * @date 01. May 2023
  7. ******************************************************************************/
  8. /*
  9. * Copyright (c) 2009-2018 Arm Limited. All rights reserved.
  10. *
  11. * SPDX-License-Identifier: Apache-2.0
  12. *
  13. * Licensed under the Apache License, Version 2.0 (the License); you may
  14. * not use this file except in compliance with the License.
  15. * You may obtain a copy of the License at
  16. *
  17. * www.apache.org/licenses/LICENSE-2.0
  18. *
  19. * Unless required by applicable law or agreed to in writing, software
  20. * distributed under the License is distributed on an AS IS BASIS, WITHOUT
  21. * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  22. * See the License for the specific language governing permissions and
  23. * limitations under the License.
  24. */
  25. #ifndef ARMCM0plus_H
  26. #define ARMCM0plus_H
  27. #ifdef __cplusplus
  28. extern "C" {
  29. #endif
  30. /* ------------------------- Interrupt Number Definition ------------------------ */
  31. typedef enum IRQn
  32. {
  33. /* ------------------- Processor Exceptions Numbers ----------------------------- */
  34. NonMaskableInt_IRQn = -14, /* 2 Non Maskable Interrupt */
  35. HardFault_IRQn = -13, /* 3 HardFault Interrupt */
  36. SVCall_IRQn = -5, /* 11 SV Call Interrupt */
  37. PendSV_IRQn = -2, /* 14 Pend SV Interrupt */
  38. SysTick_IRQn = -1, /* 15 System Tick Interrupt */
  39. /* ------------------- Processor Interrupt Numbers ------------------------------ */
  40. Interrupt0_IRQn = 0,
  41. Interrupt1_IRQn = 1,
  42. Interrupt2_IRQn = 2,
  43. Interrupt3_IRQn = 3,
  44. Interrupt4_IRQn = 4,
  45. Interrupt5_IRQn = 5,
  46. Interrupt6_IRQn = 6,
  47. Interrupt7_IRQn = 7,
  48. Interrupt8_IRQn = 8,
  49. Interrupt9_IRQn = 9,
  50. /* Interrupts 10 .. 30 are left out */
  51. Interrupt31_IRQn = 31
  52. } IRQn_Type;
  53. /* ================================================================================ */
  54. /* ================ Processor and Core Peripheral Section ================ */
  55. /* ================================================================================ */
  56. /* ------- Start of section using anonymous unions and disabling warnings ------- */
  57. #if defined (__CC_ARM)
  58. #pragma push
  59. #pragma anon_unions
  60. #elif defined (__ICCARM__)
  61. #pragma language=extended
  62. #elif defined(__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050)
  63. #pragma clang diagnostic push
  64. #pragma clang diagnostic ignored "-Wc11-extensions"
  65. #pragma clang diagnostic ignored "-Wreserved-id-macro"
  66. #elif defined (__GNUC__)
  67. /* anonymous unions are enabled by default */
  68. #elif defined (__TMS470__)
  69. /* anonymous unions are enabled by default */
  70. #elif defined (__TASKING__)
  71. #pragma warning 586
  72. #elif defined (__CSMC__)
  73. /* anonymous unions are enabled by default */
  74. #else
  75. #warning Not supported compiler type
  76. #endif
  77. /* -------- Configuration of Core Peripherals ----------------------------------- */
  78. #define __CM0PLUS_REV 0x0001U /* Core revision r0p1 */
  79. #define __MPU_PRESENT 0U /* no MPU present */
  80. #define __VTOR_PRESENT 0U /* no VTOR present */
  81. #define __NVIC_PRIO_BITS 2U /* Number of Bits used for Priority Levels */
  82. #define __Vendor_SysTickConfig 0U /* Set to 1 if different SysTick Config is used */
  83. #include "core_cm0plus.h" /* Processor and core peripherals */
  84. #include "system_ARMCM0plus.h" /* System Header */
  85. /* -------- End of section using anonymous unions and disabling warnings -------- */
  86. #if defined (__CC_ARM)
  87. #pragma pop
  88. #elif defined (__ICCARM__)
  89. /* leave anonymous unions enabled */
  90. #elif (defined(__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050))
  91. #pragma clang diagnostic pop
  92. #elif defined (__GNUC__)
  93. /* anonymous unions are enabled by default */
  94. #elif defined (__TMS470__)
  95. /* anonymous unions are enabled by default */
  96. #elif defined (__TASKING__)
  97. #pragma warning restore
  98. #elif defined (__CSMC__)
  99. /* anonymous unions are enabled by default */
  100. #else
  101. #warning Not supported compiler type
  102. #endif
  103. #ifdef __cplusplus
  104. }
  105. #endif
  106. #endif /* ARMCM0plus_H */