|
|
@@ -0,0 +1,274 @@
|
|
|
1
|
+#ifndef __UCMSIS_H__
|
|
|
2
|
+#define __UCMSIS_H__
|
|
|
3
|
+
|
|
|
4
|
+#include <stdint.h>
|
|
|
5
|
+
|
|
|
6
|
+#ifdef __cplusplus
|
|
|
7
|
+extern "C" {
|
|
|
8
|
+#endif
|
|
|
9
|
+
|
|
|
10
|
+#define __I volatile const /*!< Defines 'read only' permissions */
|
|
|
11
|
+#define __O volatile /*!< Defines 'write only' permissions */
|
|
|
12
|
+#define __IO volatile /*!< Defines 'read / write' permissions */
|
|
|
13
|
+
|
|
|
14
|
+/* following defines should be used for structure members */
|
|
|
15
|
+#define __IM volatile const /*! Defines 'read only' structure member permissions */
|
|
|
16
|
+#define __OM volatile /*! Defines 'write only' structure member permissions */
|
|
|
17
|
+#define __IOM volatile /*! Defines 'read / write' structure member permissions */
|
|
|
18
|
+
|
|
|
19
|
+#define __NVIC_PRIO_BITS 8U
|
|
|
20
|
+
|
|
|
21
|
+#define WEAK __attribute__((weak))
|
|
|
22
|
+#define ALIAS(sym) __attribute__((weak, alias (sym)))
|
|
|
23
|
+#define NORETURN __attribute__((noreturn))
|
|
|
24
|
+#define SECTION(name) __attribute__ ((section(name)))
|
|
|
25
|
+#define INLINE __attribute__((always_inline)) inline
|
|
|
26
|
+#define STATIC_INLINE static INLINE
|
|
|
27
|
+
|
|
|
28
|
+typedef enum IRQn
|
|
|
29
|
+{
|
|
|
30
|
+/* ------------------- Processor Exceptions Numbers ----------------------------- */
|
|
|
31
|
+ NonMaskableInt_IRQn = -14, /* 2 Non Maskable Interrupt */
|
|
|
32
|
+ HardFault_IRQn = -13, /* 3 HardFault Interrupt */
|
|
|
33
|
+
|
|
|
34
|
+
|
|
|
35
|
+
|
|
|
36
|
+ SVCall_IRQn = -5, /* 11 SV Call Interrupt */
|
|
|
37
|
+
|
|
|
38
|
+ PendSV_IRQn = -2, /* 14 Pend SV Interrupt */
|
|
|
39
|
+ SysTick_IRQn = -1, /* 15 System Tick Interrupt */
|
|
|
40
|
+
|
|
|
41
|
+} IRQn_Type;
|
|
|
42
|
+
|
|
|
43
|
+/* Memory mapping of Core Hardware */
|
|
|
44
|
+#define SCS_BASE (0xE000E000UL) /*!< System Control Space Base Address */
|
|
|
45
|
+#define ITM_BASE (0xE0000000UL) /*!< ITM Base Address */
|
|
|
46
|
+#define DWT_BASE (0xE0001000UL) /*!< DWT Base Address */
|
|
|
47
|
+#define TPI_BASE (0xE0040000UL) /*!< TPI Base Address */
|
|
|
48
|
+#define CoreDebug_BASE (0xE000EDF0UL) /*!< Core Debug Base Address */
|
|
|
49
|
+#define SysTick_BASE (SCS_BASE + 0x0010UL) /*!< SysTick Base Address */
|
|
|
50
|
+#define NVIC_BASE (SCS_BASE + 0x0100UL) /*!< NVIC Base Address */
|
|
|
51
|
+#define SCB_BASE (SCS_BASE + 0x0D00UL) /*!< System Control Block Base Address */
|
|
|
52
|
+
|
|
|
53
|
+#define SCnSCB ((SCnSCB_Type *) SCS_BASE ) /*!< System control Register not in SCB */
|
|
|
54
|
+#define SCB ((SCB_Type *) SCB_BASE ) /*!< SCB configuration struct */
|
|
|
55
|
+#define SysTick ((SysTick_Type *) SysTick_BASE ) /*!< SysTick configuration struct */
|
|
|
56
|
+#define NVIC ((NVIC_Type *) NVIC_BASE ) /*!< NVIC configuration struct */
|
|
|
57
|
+#define ITM ((ITM_Type *) ITM_BASE ) /*!< ITM configuration struct */
|
|
|
58
|
+#define DWT ((DWT_Type *) DWT_BASE ) /*!< DWT configuration struct */
|
|
|
59
|
+#define TPI ((TPI_Type *) TPI_BASE ) /*!< TPI configuration struct */
|
|
|
60
|
+#define CoreDebug ((CoreDebug_Type *) CoreDebug_BASE) /*!< Core Debug configuration struct */
|
|
|
61
|
+
|
|
|
62
|
+/**
|
|
|
63
|
+ \brief Structure type to access the Nested Vectored Interrupt Controller (NVIC).
|
|
|
64
|
+ */
|
|
|
65
|
+typedef struct {
|
|
|
66
|
+ __IOM uint32_t ISER[8U]; /*!< Offset: 0x000 (R/W) Interrupt Set Enable Register */
|
|
|
67
|
+ uint32_t RESERVED0[24U];
|
|
|
68
|
+ __IOM uint32_t ICER[8U]; /*!< Offset: 0x080 (R/W) Interrupt Clear Enable Register */
|
|
|
69
|
+ uint32_t RESERVED1[24U];
|
|
|
70
|
+ __IOM uint32_t ISPR[8U]; /*!< Offset: 0x100 (R/W) Interrupt Set Pending Register */
|
|
|
71
|
+ uint32_t RESERVED2[24U];
|
|
|
72
|
+ __IOM uint32_t ICPR[8U]; /*!< Offset: 0x180 (R/W) Interrupt Clear Pending Register */
|
|
|
73
|
+ uint32_t RESERVED3[24U];
|
|
|
74
|
+ __IOM uint32_t IABR[8U]; /*!< Offset: 0x200 (R/W) Interrupt Active bit Register */
|
|
|
75
|
+ uint32_t RESERVED4[56U];
|
|
|
76
|
+ __IOM uint8_t IP[240U]; /*!< Offset: 0x300 (R/W) Interrupt Priority Register (8Bit wide) */
|
|
|
77
|
+ uint32_t RESERVED5[644U];
|
|
|
78
|
+ __OM uint32_t STIR; /*!< Offset: 0xE00 ( /W) Software Trigger Interrupt Register */
|
|
|
79
|
+} NVIC_Type;
|
|
|
80
|
+
|
|
|
81
|
+#define SCB_ICSR_PENDSVSET_Pos 28U /*!< SCB ICSR: PENDSVSET Position */
|
|
|
82
|
+#define SCB_ICSR_PENDSVSET_Msk (1UL << SCB_ICSR_PENDSVSET_Pos) /*!< SCB ICSR: PENDSVSET Mask */
|
|
|
83
|
+
|
|
|
84
|
+/**
|
|
|
85
|
+ \brief Structure type to access the System Control Block (SCB).
|
|
|
86
|
+ */
|
|
|
87
|
+typedef struct {
|
|
|
88
|
+ __IM uint32_t CPUID; /*!< Offset: 0x000 (R/ ) CPUID Base Register */
|
|
|
89
|
+ __IOM uint32_t ICSR; /*!< Offset: 0x004 (R/W) Interrupt Control and State Register */
|
|
|
90
|
+ __IOM uint32_t VTOR; /*!< Offset: 0x008 (R/W) Vector Table Offset Register */
|
|
|
91
|
+ __IOM uint32_t AIRCR; /*!< Offset: 0x00C (R/W) Application Interrupt and Reset Control Register */
|
|
|
92
|
+ __IOM uint32_t SCR; /*!< Offset: 0x010 (R/W) System Control Register */
|
|
|
93
|
+ __IOM uint32_t CCR; /*!< Offset: 0x014 (R/W) Configuration Control Register */
|
|
|
94
|
+ __IOM uint8_t SHP[12U]; /*!< Offset: 0x018 (R/W) System Handlers Priority Registers (4-7, 8-11, 12-15) */
|
|
|
95
|
+ __IOM uint32_t SHCSR; /*!< Offset: 0x024 (R/W) System Handler Control and State Register */
|
|
|
96
|
+ __IOM uint32_t CFSR; /*!< Offset: 0x028 (R/W) Configurable Fault Status Register */
|
|
|
97
|
+ __IOM uint32_t HFSR; /*!< Offset: 0x02C (R/W) HardFault Status Register */
|
|
|
98
|
+ __IOM uint32_t DFSR; /*!< Offset: 0x030 (R/W) Debug Fault Status Register */
|
|
|
99
|
+ __IOM uint32_t MMFAR; /*!< Offset: 0x034 (R/W) MemManage Fault Address Register */
|
|
|
100
|
+ __IOM uint32_t BFAR; /*!< Offset: 0x038 (R/W) BusFault Address Register */
|
|
|
101
|
+ __IOM uint32_t AFSR; /*!< Offset: 0x03C (R/W) Auxiliary Fault Status Register */
|
|
|
102
|
+ __IM uint32_t PFR[2U]; /*!< Offset: 0x040 (R/ ) Processor Feature Register */
|
|
|
103
|
+ __IM uint32_t DFR; /*!< Offset: 0x048 (R/ ) Debug Feature Register */
|
|
|
104
|
+ __IM uint32_t ADR; /*!< Offset: 0x04C (R/ ) Auxiliary Feature Register */
|
|
|
105
|
+ __IM uint32_t MMFR[4U]; /*!< Offset: 0x050 (R/ ) Memory Model Feature Register */
|
|
|
106
|
+ __IM uint32_t ISAR[5U]; /*!< Offset: 0x060 (R/ ) Instruction Set Attributes Register */
|
|
|
107
|
+ uint32_t RESERVED0[5U];
|
|
|
108
|
+ __IOM uint32_t CPACR; /*!< Offset: 0x088 (R/W) Coprocessor Access Control Register */
|
|
|
109
|
+} SCB_Type;
|
|
|
110
|
+
|
|
|
111
|
+/* SCB System Handler Control and State Register Definitions */
|
|
|
112
|
+#define SCB_SHCSR_USGFAULTENA_Pos 18U /*!< SCB SHCSR: USGFAULTENA Position */
|
|
|
113
|
+#define SCB_SHCSR_USGFAULTENA_Msk (1UL << SCB_SHCSR_USGFAULTENA_Pos) /*!< SCB SHCSR: USGFAULTENA Mask */
|
|
|
114
|
+
|
|
|
115
|
+#define SCB_SHCSR_BUSFAULTENA_Pos 17U /*!< SCB SHCSR: BUSFAULTENA Position */
|
|
|
116
|
+#define SCB_SHCSR_BUSFAULTENA_Msk (1UL << SCB_SHCSR_BUSFAULTENA_Pos) /*!< SCB SHCSR: BUSFAULTENA Mask */
|
|
|
117
|
+
|
|
|
118
|
+#define SCB_SHCSR_MEMFAULTENA_Pos 16U /*!< SCB SHCSR: MEMFAULTENA Position */
|
|
|
119
|
+#define SCB_SHCSR_MEMFAULTENA_Msk (1UL << SCB_SHCSR_MEMFAULTENA_Pos) /*!< SCB SHCSR: MEMFAULTENA Mask */
|
|
|
120
|
+
|
|
|
121
|
+#define SCB_SHCSR_SVCALLPENDED_Pos 15U /*!< SCB SHCSR: SVCALLPENDED Position */
|
|
|
122
|
+#define SCB_SHCSR_SVCALLPENDED_Msk (1UL << SCB_SHCSR_SVCALLPENDED_Pos) /*!< SCB SHCSR: SVCALLPENDED Mask */
|
|
|
123
|
+
|
|
|
124
|
+#define SCB_SHCSR_BUSFAULTPENDED_Pos 14U /*!< SCB SHCSR: BUSFAULTPENDED Position */
|
|
|
125
|
+#define SCB_SHCSR_BUSFAULTPENDED_Msk (1UL << SCB_SHCSR_BUSFAULTPENDED_Pos) /*!< SCB SHCSR: BUSFAULTPENDED Mask */
|
|
|
126
|
+
|
|
|
127
|
+#define SCB_SHCSR_MEMFAULTPENDED_Pos 13U /*!< SCB SHCSR: MEMFAULTPENDED Position */
|
|
|
128
|
+#define SCB_SHCSR_MEMFAULTPENDED_Msk (1UL << SCB_SHCSR_MEMFAULTPENDED_Pos) /*!< SCB SHCSR: MEMFAULTPENDED Mask */
|
|
|
129
|
+
|
|
|
130
|
+#define SCB_SHCSR_USGFAULTPENDED_Pos 12U /*!< SCB SHCSR: USGFAULTPENDED Position */
|
|
|
131
|
+#define SCB_SHCSR_USGFAULTPENDED_Msk (1UL << SCB_SHCSR_USGFAULTPENDED_Pos) /*!< SCB SHCSR: USGFAULTPENDED Mask */
|
|
|
132
|
+
|
|
|
133
|
+#define SCB_SHCSR_SYSTICKACT_Pos 11U /*!< SCB SHCSR: SYSTICKACT Position */
|
|
|
134
|
+#define SCB_SHCSR_SYSTICKACT_Msk (1UL << SCB_SHCSR_SYSTICKACT_Pos) /*!< SCB SHCSR: SYSTICKACT Mask */
|
|
|
135
|
+
|
|
|
136
|
+#define SCB_SHCSR_PENDSVACT_Pos 10U /*!< SCB SHCSR: PENDSVACT Position */
|
|
|
137
|
+#define SCB_SHCSR_PENDSVACT_Msk (1UL << SCB_SHCSR_PENDSVACT_Pos) /*!< SCB SHCSR: PENDSVACT Mask */
|
|
|
138
|
+
|
|
|
139
|
+#define SCB_SHCSR_MONITORACT_Pos 8U /*!< SCB SHCSR: MONITORACT Position */
|
|
|
140
|
+#define SCB_SHCSR_MONITORACT_Msk (1UL << SCB_SHCSR_MONITORACT_Pos) /*!< SCB SHCSR: MONITORACT Mask */
|
|
|
141
|
+
|
|
|
142
|
+#define SCB_SHCSR_SVCALLACT_Pos 7U /*!< SCB SHCSR: SVCALLACT Position */
|
|
|
143
|
+#define SCB_SHCSR_SVCALLACT_Msk (1UL << SCB_SHCSR_SVCALLACT_Pos) /*!< SCB SHCSR: SVCALLACT Mask */
|
|
|
144
|
+
|
|
|
145
|
+#define SCB_SHCSR_USGFAULTACT_Pos 3U /*!< SCB SHCSR: USGFAULTACT Position */
|
|
|
146
|
+#define SCB_SHCSR_USGFAULTACT_Msk (1UL << SCB_SHCSR_USGFAULTACT_Pos) /*!< SCB SHCSR: USGFAULTACT Mask */
|
|
|
147
|
+
|
|
|
148
|
+#define SCB_SHCSR_BUSFAULTACT_Pos 1U /*!< SCB SHCSR: BUSFAULTACT Position */
|
|
|
149
|
+#define SCB_SHCSR_BUSFAULTACT_Msk (1UL << SCB_SHCSR_BUSFAULTACT_Pos) /*!< SCB SHCSR: BUSFAULTACT Mask */
|
|
|
150
|
+
|
|
|
151
|
+#define SCB_SHCSR_MEMFAULTACT_Pos 0U /*!< SCB SHCSR: MEMFAULTACT Position */
|
|
|
152
|
+#define SCB_SHCSR_MEMFAULTACT_Msk (1UL /*<< SCB_SHCSR_MEMFAULTACT_Pos*/) /*!< SCB SHCSR: MEMFAULTACT Mask */
|
|
|
153
|
+
|
|
|
154
|
+
|
|
|
155
|
+/**
|
|
|
156
|
+ \brief Structure type to access the Data Watchpoint and Trace Register (DWT).
|
|
|
157
|
+ */
|
|
|
158
|
+typedef struct {
|
|
|
159
|
+ __IOM uint32_t CTRL; /*!< Offset: 0x000 (R/W) Control Register */
|
|
|
160
|
+ __IOM uint32_t CYCCNT; /*!< Offset: 0x004 (R/W) Cycle Count Register */
|
|
|
161
|
+ __IOM uint32_t CPICNT; /*!< Offset: 0x008 (R/W) CPI Count Register */
|
|
|
162
|
+ __IOM uint32_t EXCCNT; /*!< Offset: 0x00C (R/W) Exception Overhead Count Register */
|
|
|
163
|
+ __IOM uint32_t SLEEPCNT; /*!< Offset: 0x010 (R/W) Sleep Count Register */
|
|
|
164
|
+ __IOM uint32_t LSUCNT; /*!< Offset: 0x014 (R/W) LSU Count Register */
|
|
|
165
|
+ __IOM uint32_t FOLDCNT; /*!< Offset: 0x018 (R/W) Folded-instruction Count Register */
|
|
|
166
|
+ __IM uint32_t PCSR; /*!< Offset: 0x01C (R/ ) Program Counter Sample Register */
|
|
|
167
|
+ __IOM uint32_t COMP0; /*!< Offset: 0x020 (R/W) Comparator Register 0 */
|
|
|
168
|
+ __IOM uint32_t MASK0; /*!< Offset: 0x024 (R/W) Mask Register 0 */
|
|
|
169
|
+ __IOM uint32_t FUNCTION0; /*!< Offset: 0x028 (R/W) Function Register 0 */
|
|
|
170
|
+ uint32_t RESERVED0[1U];
|
|
|
171
|
+ __IOM uint32_t COMP1; /*!< Offset: 0x030 (R/W) Comparator Register 1 */
|
|
|
172
|
+ __IOM uint32_t MASK1; /*!< Offset: 0x034 (R/W) Mask Register 1 */
|
|
|
173
|
+ __IOM uint32_t FUNCTION1; /*!< Offset: 0x038 (R/W) Function Register 1 */
|
|
|
174
|
+ uint32_t RESERVED1[1U];
|
|
|
175
|
+ __IOM uint32_t COMP2; /*!< Offset: 0x040 (R/W) Comparator Register 2 */
|
|
|
176
|
+ __IOM uint32_t MASK2; /*!< Offset: 0x044 (R/W) Mask Register 2 */
|
|
|
177
|
+ __IOM uint32_t FUNCTION2; /*!< Offset: 0x048 (R/W) Function Register 2 */
|
|
|
178
|
+ uint32_t RESERVED2[1U];
|
|
|
179
|
+ __IOM uint32_t COMP3; /*!< Offset: 0x050 (R/W) Comparator Register 3 */
|
|
|
180
|
+ __IOM uint32_t MASK3; /*!< Offset: 0x054 (R/W) Mask Register 3 */
|
|
|
181
|
+ __IOM uint32_t FUNCTION3; /*!< Offset: 0x058 (R/W) Function Register 3 */
|
|
|
182
|
+} DWT_Type;
|
|
|
183
|
+
|
|
|
184
|
+/**
|
|
|
185
|
+ \brief Structure type to access the Memory Protection Unit (MPU).
|
|
|
186
|
+ */
|
|
|
187
|
+typedef struct {
|
|
|
188
|
+ __IM uint32_t TYPE; /*!< Offset: 0x000 (R/ ) MPU Type Register */
|
|
|
189
|
+ __IOM uint32_t CTRL; /*!< Offset: 0x004 (R/W) MPU Control Register */
|
|
|
190
|
+ __IOM uint32_t RNR; /*!< Offset: 0x008 (R/W) MPU Region RNRber Register */
|
|
|
191
|
+ __IOM uint32_t RBAR; /*!< Offset: 0x00C (R/W) MPU Region Base Address Register */
|
|
|
192
|
+ __IOM uint32_t RASR; /*!< Offset: 0x010 (R/W) MPU Region Attribute and Size Register */
|
|
|
193
|
+ __IOM uint32_t RBAR_A1; /*!< Offset: 0x014 (R/W) MPU Alias 1 Region Base Address Register */
|
|
|
194
|
+ __IOM uint32_t RASR_A1; /*!< Offset: 0x018 (R/W) MPU Alias 1 Region Attribute and Size Register */
|
|
|
195
|
+ __IOM uint32_t RBAR_A2; /*!< Offset: 0x01C (R/W) MPU Alias 2 Region Base Address Register */
|
|
|
196
|
+ __IOM uint32_t RASR_A2; /*!< Offset: 0x020 (R/W) MPU Alias 2 Region Attribute and Size Register */
|
|
|
197
|
+ __IOM uint32_t RBAR_A3; /*!< Offset: 0x024 (R/W) MPU Alias 3 Region Base Address Register */
|
|
|
198
|
+ __IOM uint32_t RASR_A3; /*!< Offset: 0x028 (R/W) MPU Alias 3 Region Attribute and Size Register */
|
|
|
199
|
+} MPU_Type;
|
|
|
200
|
+
|
|
|
201
|
+/**
|
|
|
202
|
+ \brief Structure type to access the Core Debug Register (CoreDebug).
|
|
|
203
|
+ */
|
|
|
204
|
+typedef struct {
|
|
|
205
|
+ __IOM uint32_t DHCSR; /*!< Offset: 0x000 (R/W) Debug Halting Control and Status Register */
|
|
|
206
|
+ __OM uint32_t DCRSR; /*!< Offset: 0x004 ( /W) Debug Core Register Selector Register */
|
|
|
207
|
+ __IOM uint32_t DCRDR; /*!< Offset: 0x008 (R/W) Debug Core Register Data Register */
|
|
|
208
|
+ __IOM uint32_t DEMCR; /*!< Offset: 0x00C (R/W) Debug Exception and Monitor Control Register */
|
|
|
209
|
+} CoreDebug_Type;
|
|
|
210
|
+
|
|
|
211
|
+
|
|
|
212
|
+STATIC_INLINE uint32_t __get_CONTROL(void)
|
|
|
213
|
+{
|
|
|
214
|
+ uint32_t tmp;
|
|
|
215
|
+ __asm__ volatile("mrs\t%0, CONTROL\n":"=r" (tmp));
|
|
|
216
|
+ return tmp;
|
|
|
217
|
+}
|
|
|
218
|
+
|
|
|
219
|
+STATIC_INLINE void __set_CONTROL(uint32_t tmp)
|
|
|
220
|
+{
|
|
|
221
|
+ __asm__ volatile("msr\tCONTROL, %0\n"::"r" (tmp));
|
|
|
222
|
+}
|
|
|
223
|
+
|
|
|
224
|
+STATIC_INLINE void __set_MSP(uint32_t tmp)
|
|
|
225
|
+{
|
|
|
226
|
+ __asm__ volatile("msr\tMSP, %0\n"::"r" (tmp));
|
|
|
227
|
+}
|
|
|
228
|
+
|
|
|
229
|
+/**
|
|
|
230
|
+ \brief Set Interrupt Priority
|
|
|
231
|
+ \details Sets the priority of a device specific interrupt or a processor exception.
|
|
|
232
|
+ The interrupt number can be positive to specify a device specific interrupt,
|
|
|
233
|
+ or negative to specify a processor exception.
|
|
|
234
|
+ \param [in] IRQn Interrupt number.
|
|
|
235
|
+ \param [in] priority Priority to set.
|
|
|
236
|
+ \note The priority cannot be set for every processor exception.
|
|
|
237
|
+ */
|
|
|
238
|
+STATIC_INLINE void __NVIC_SetPriority(IRQn_Type IRQn, uint32_t priority)
|
|
|
239
|
+{
|
|
|
240
|
+ if ((int32_t)(IRQn) >= 0)
|
|
|
241
|
+ {
|
|
|
242
|
+ NVIC->IP[((uint32_t)IRQn)] = (uint8_t)((priority << (8U - __NVIC_PRIO_BITS)) & (uint32_t)0xFFUL);
|
|
|
243
|
+ }
|
|
|
244
|
+ else
|
|
|
245
|
+ {
|
|
|
246
|
+ SCB->SHP[(((uint32_t)IRQn) & 0xFUL)-4UL] = (uint8_t)((priority << (8U - __NVIC_PRIO_BITS)) & (uint32_t)0xFFUL);
|
|
|
247
|
+ }
|
|
|
248
|
+}
|
|
|
249
|
+
|
|
|
250
|
+STATIC_INLINE void __WFI(void)
|
|
|
251
|
+{
|
|
|
252
|
+ __asm__ volatile("wfi");
|
|
|
253
|
+}
|
|
|
254
|
+
|
|
|
255
|
+STATIC_INLINE void __BKPT(uint8_t n)
|
|
|
256
|
+{
|
|
|
257
|
+ __asm__ volatile("bkpt %0" : : "i" (n & 0xFF));
|
|
|
258
|
+}
|
|
|
259
|
+
|
|
|
260
|
+STATIC_INLINE void __disable_irq(void)
|
|
|
261
|
+{
|
|
|
262
|
+ __asm__ volatile ("cpsid i" : : : "memory");
|
|
|
263
|
+}
|
|
|
264
|
+
|
|
|
265
|
+STATIC_INLINE void __enable_irq(void)
|
|
|
266
|
+{
|
|
|
267
|
+ __asm__ volatile("cpsie i" : : : "memory");
|
|
|
268
|
+}
|
|
|
269
|
+
|
|
|
270
|
+#ifdef __cplusplus
|
|
|
271
|
+}
|
|
|
272
|
+#endif
|
|
|
273
|
+
|
|
|
274
|
+#endif /* __UCMSIS_H__ */
|