EE445M RTOS
Taken at the University of Texas Spring 2015
interrupt.c
Go to the documentation of this file.
1 //*****************************************************************************
2 //
3 // interrupt.c - Driver for the NVIC Interrupt Controller.
4 //
5 // Copyright (c) 2005-2014 Texas Instruments Incorporated. All rights reserved.
6 // Software License Agreement
7 //
8 // Redistribution and use in source and binary forms, with or without
9 // modification, are permitted provided that the following conditions
10 // are met:
11 //
12 // Redistributions of source code must retain the above copyright
13 // notice, this list of conditions and the following disclaimer.
14 //
15 // Redistributions in binary form must reproduce the above copyright
16 // notice, this list of conditions and the following disclaimer in the
17 // documentation and/or other materials provided with the
18 // distribution.
19 //
20 // Neither the name of Texas Instruments Incorporated nor the names of
21 // its contributors may be used to endorse or promote products derived
22 // from this software without specific prior written permission.
23 //
24 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
25 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
26 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
27 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
28 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
29 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
30 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
31 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
32 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
33 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
34 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
35 //
36 // This is part of revision 2.1.0.12573 of the Tiva Peripheral Driver Library.
37 //
38 //*****************************************************************************
39 
40 //*****************************************************************************
41 //
44 //
45 //*****************************************************************************
46 
47 #include <stdbool.h>
48 #include <stdint.h>
49 #include "inc/hw_ints.h"
50 #include "inc/hw_nvic.h"
51 #include "inc/hw_types.h"
52 #include "driverlib/cpu.h"
53 #include "driverlib/debug.h"
54 #include "driverlib/interrupt.h"
55 
56 //*****************************************************************************
57 //
58 // This is a mapping between priority grouping encodings and the number of
59 // preemption priority bits.
60 //
61 //*****************************************************************************
62 static const uint32_t g_pui32Priority[] =
63 {
67 };
68 
69 //*****************************************************************************
70 //
71 // This is a mapping between interrupt number and the register that contains
72 // the priority encoding for that interrupt.
73 //
74 //*****************************************************************************
75 static const uint32_t g_pui32Regs[] =
76 {
84 };
85 
86 //*****************************************************************************
87 //
88 // This is a mapping between interrupt number (for the peripheral interrupts
89 // only) and the register that contains the interrupt enable for that
90 // interrupt.
91 //
92 //*****************************************************************************
93 static const uint32_t g_pui32EnRegs[] =
94 {
96 };
97 
98 //*****************************************************************************
99 //
100 // This is a mapping between interrupt number (for the peripheral interrupts
101 // only) and the register that contains the interrupt disable for that
102 // interrupt.
103 //
104 //*****************************************************************************
105 static const uint32_t g_pui32Dii16Regs[] =
106 {
108 };
109 
110 //*****************************************************************************
111 //
112 // This is a mapping between interrupt number (for the peripheral interrupts
113 // only) and the register that contains the interrupt pend for that interrupt.
114 //
115 //*****************************************************************************
116 static const uint32_t g_pui32PendRegs[] =
117 {
119 };
120 
121 //*****************************************************************************
122 //
123 // This is a mapping between interrupt number (for the peripheral interrupts
124 // only) and the register that contains the interrupt unpend for that
125 // interrupt.
126 //
127 //*****************************************************************************
128 static const uint32_t g_pui32UnpendRegs[] =
129 {
131 };
132 
133 //*****************************************************************************
134 //
144 //
145 //*****************************************************************************
146 static void
148 {
149  //
150  // Go into an infinite loop.
151  //
152  while(1)
153  {
154  }
155 }
156 
157 //*****************************************************************************
158 //
159 // The processor vector table.
160 //
161 // This contains a list of the handlers for the various interrupt sources in
162 // the system. The layout of this list is defined by the hardware; assertion
163 // of an interrupt causes the processor to start executing directly at the
164 // address given in the corresponding location in this list.
165 //
166 //*****************************************************************************
167 //
168 // Set the size of the vector table to the largest number of interrupts of
169 // any device
170 //
171 #undef NUM_INTERRUPTS
172 #define NUM_INTERRUPTS 155
173 #if defined(ewarm)
174 #pragma data_alignment=1024
175 static __no_init void (*g_pfnRAMVectors[NUM_INTERRUPTS])(void) @ "VTABLE";
176 #elif defined(sourcerygxx)
177 static __attribute__((section(".cs3.region-head.ram")))
178 void (*g_pfnRAMVectors[NUM_INTERRUPTS])(void) __attribute__ ((aligned(1024)));
179 #elif defined(ccs) || defined(DOXYGEN)
180 #pragma DATA_ALIGN(g_pfnRAMVectors, 1024)
181 #pragma DATA_SECTION(g_pfnRAMVectors, ".vtable")
182 void (*g_pfnRAMVectors[NUM_INTERRUPTS])(void);
183 #else
184 static __attribute__((section("vtable")))
185 void (*g_pfnRAMVectors[NUM_INTERRUPTS])(void) __attribute__((aligned(1024)));
186 #endif
187 
188 //*****************************************************************************
189 //
208 //
209 //*****************************************************************************
210 bool
211 IntMasterEnable(void)
212 {
213  //
214  // Enable processor interrupts.
215  //
216  return(CPUcpsie());
217 }
218 
219 //*****************************************************************************
220 //
246 //
247 //*****************************************************************************
248 bool
250 {
251  //
252  // Disable processor interrupts.
253  //
254  return(CPUcpsid());
255 }
256 
257 //*****************************************************************************
258 //
306 //
307 //*****************************************************************************
308 void
309 IntRegister(uint32_t ui32Interrupt, void (*pfnHandler)(void))
310 {
311  uint32_t ui32Idx, ui32Value;
312 
313  //
314  // Check the arguments.
315  //
316  ASSERT(ui32Interrupt < NUM_INTERRUPTS);
317 
318  //
319  // Make sure that the RAM vector table is correctly aligned.
320  //
321  ASSERT(((uint32_t)g_pfnRAMVectors & 0x000003ff) == 0);
322 
323  //
324  // See if the RAM vector table has been initialized.
325  //
326  if(HWREG(NVIC_VTABLE) != (uint32_t)g_pfnRAMVectors)
327  {
328  //
329  // Copy the vector table from the beginning of FLASH to the RAM vector
330  // table.
331  //
332  ui32Value = HWREG(NVIC_VTABLE);
333  for(ui32Idx = 0; ui32Idx < NUM_INTERRUPTS; ui32Idx++)
334  {
335  g_pfnRAMVectors[ui32Idx] = (void (*)(void))HWREG((ui32Idx * 4) +
336  ui32Value);
337  }
338 
339  //
340  // Point the NVIC at the RAM vector table.
341  //
342  HWREG(NVIC_VTABLE) = (uint32_t)g_pfnRAMVectors;
343  }
344 
345  //
346  // Save the interrupt handler.
347  //
348  g_pfnRAMVectors[ui32Interrupt] = pfnHandler;
349 }
350 
351 //*****************************************************************************
352 //
378 //
379 //*****************************************************************************
380 void
381 IntUnregister(uint32_t ui32Interrupt)
382 {
383  //
384  // Check the arguments.
385  //
386  ASSERT(ui32Interrupt < NUM_INTERRUPTS);
387 
388  //
389  // Reset the interrupt handler.
390  //
391  g_pfnRAMVectors[ui32Interrupt] = _IntDefaultHandler;
392 }
393 
394 //*****************************************************************************
395 //
418 //
419 //*****************************************************************************
420 void
421 IntPriorityGroupingSet(uint32_t ui32Bits)
422 {
423  //
424  // Check the arguments.
425  //
426  ASSERT(ui32Bits < NUM_PRIORITY);
427 
428  //
429  // Set the priority grouping.
430  //
432 }
433 
434 //*****************************************************************************
435 //
452 //
453 //*****************************************************************************
454 uint32_t
456 {
457  uint32_t ui32Loop, ui32Value;
458 
459  //
460  // Read the priority grouping.
461  //
462  ui32Value = HWREG(NVIC_APINT) & NVIC_APINT_PRIGROUP_M;
463 
464  //
465  // Loop through the priority grouping values.
466  //
467  for(ui32Loop = 0; ui32Loop < NUM_PRIORITY; ui32Loop++)
468  {
469  //
470  // Stop looping if this value matches.
471  //
472  if(ui32Value == g_pui32Priority[ui32Loop])
473  {
474  break;
475  }
476  }
477 
478  //
479  // Return the number of priority bits.
480  //
481  return(ui32Loop);
482 }
483 
484 //*****************************************************************************
485 //
524 //
525 //*****************************************************************************
526 void
527 IntPrioritySet(uint32_t ui32Interrupt, uint8_t ui8Priority)
528 {
529  uint32_t ui32Temp;
530 
531  //
532  // Check the arguments.
533  //
534  ASSERT((ui32Interrupt >= 4) && (ui32Interrupt < NUM_INTERRUPTS));
535 
536  //
537  // Set the interrupt priority.
538  //
539  ui32Temp = HWREG(g_pui32Regs[ui32Interrupt >> 2]);
540  ui32Temp &= ~(0xFF << (8 * (ui32Interrupt & 3)));
541  ui32Temp |= ui8Priority << (8 * (ui32Interrupt & 3));
542  HWREG(g_pui32Regs[ui32Interrupt >> 2]) = ui32Temp;
543 }
544 
545 //*****************************************************************************
546 //
567 //
568 //*****************************************************************************
569 int32_t
570 IntPriorityGet(uint32_t ui32Interrupt)
571 {
572  //
573  // Check the arguments.
574  //
575  ASSERT((ui32Interrupt >= 4) && (ui32Interrupt < NUM_INTERRUPTS));
576 
577  //
578  // Return the interrupt priority.
579  //
580  return((HWREG(g_pui32Regs[ui32Interrupt >> 2]) >>
581  (8 * (ui32Interrupt & 3))) & 0xFF);
582 }
583 
584 //*****************************************************************************
585 //
607 //
608 //*****************************************************************************
609 void
610 IntEnable(uint32_t ui32Interrupt)
611 {
612  //
613  // Check the arguments.
614  //
615  ASSERT(ui32Interrupt < NUM_INTERRUPTS);
616 
617  //
618  // Determine the interrupt to enable.
619  //
620  if(ui32Interrupt == FAULT_MPU)
621  {
622  //
623  // Enable the MemManage interrupt.
624  //
626  }
627  else if(ui32Interrupt == FAULT_BUS)
628  {
629  //
630  // Enable the bus fault interrupt.
631  //
633  }
634  else if(ui32Interrupt == FAULT_USAGE)
635  {
636  //
637  // Enable the usage fault interrupt.
638  //
640  }
641  else if(ui32Interrupt == FAULT_SYSTICK)
642  {
643  //
644  // Enable the System Tick interrupt.
645  //
647  }
648  else if(ui32Interrupt >= 16)
649  {
650  //
651  // Enable the general interrupt.
652  //
653  HWREG(g_pui32EnRegs[(ui32Interrupt - 16) / 32]) =
654  1 << ((ui32Interrupt - 16) & 31);
655  }
656 }
657 
658 //*****************************************************************************
659 //
681 //
682 //*****************************************************************************
683 void
684 IntDisable(uint32_t ui32Interrupt)
685 {
686  //
687  // Check the arguments.
688  //
689  ASSERT(ui32Interrupt < NUM_INTERRUPTS);
690 
691  //
692  // Determine the interrupt to disable.
693  //
694  if(ui32Interrupt == FAULT_MPU)
695  {
696  //
697  // Disable the MemManage interrupt.
698  //
700  }
701  else if(ui32Interrupt == FAULT_BUS)
702  {
703  //
704  // Disable the bus fault interrupt.
705  //
707  }
708  else if(ui32Interrupt == FAULT_USAGE)
709  {
710  //
711  // Disable the usage fault interrupt.
712  //
714  }
715  else if(ui32Interrupt == FAULT_SYSTICK)
716  {
717  //
718  // Disable the System Tick interrupt.
719  //
721  }
722  else if(ui32Interrupt >= 16)
723  {
724  //
725  // Disable the general interrupt.
726  //
727  HWREG(g_pui32Dii16Regs[(ui32Interrupt - 16) / 32]) =
728  1 << ((ui32Interrupt - 16) & 31);
729  }
730 }
731 
732 //*****************************************************************************
733 //
756 //
757 //*****************************************************************************
758 uint32_t
759 IntIsEnabled(uint32_t ui32Interrupt)
760 {
761  uint32_t ui32Ret;
762 
763  //
764  // Check the arguments.
765  //
766  ASSERT(ui32Interrupt < NUM_INTERRUPTS);
767 
768  //
769  // Initialize the return value.
770  //
771  ui32Ret = 0;
772 
773  //
774  // Determine the interrupt to disable.
775  //
776  if(ui32Interrupt == FAULT_MPU)
777  {
778  //
779  // Check the MemManage interrupt.
780  //
782  }
783  else if(ui32Interrupt == FAULT_BUS)
784  {
785  //
786  // Check the bus fault interrupt.
787  //
789  }
790  else if(ui32Interrupt == FAULT_USAGE)
791  {
792  //
793  // Check the usage fault interrupt.
794  //
796  }
797  else if(ui32Interrupt == FAULT_SYSTICK)
798  {
799  //
800  // Check the System Tick interrupt.
801  //
803  }
804  else if(ui32Interrupt >= 16)
805  {
806  //
807  // Check the general interrupt.
808  //
809  ui32Ret = HWREG(g_pui32EnRegs[(ui32Interrupt - 16) / 32]) &
810  (1 << ((ui32Interrupt - 16) & 31));
811  }
812  return(ui32Ret);
813 }
814 
815 //*****************************************************************************
816 //
841 //
842 //*****************************************************************************
843 void
844 IntPendSet(uint32_t ui32Interrupt)
845 {
846  //
847  // Check the arguments.
848  //
849  ASSERT(ui32Interrupt < NUM_INTERRUPTS);
850 
851  //
852  // Determine the interrupt to pend.
853  //
854  if(ui32Interrupt == FAULT_NMI)
855  {
856  //
857  // Pend the NMI interrupt.
858  //
860  }
861  else if(ui32Interrupt == FAULT_PENDSV)
862  {
863  //
864  // Pend the PendSV interrupt.
865  //
867  }
868  else if(ui32Interrupt == FAULT_SYSTICK)
869  {
870  //
871  // Pend the SysTick interrupt.
872  //
874  }
875  else if(ui32Interrupt >= 16)
876  {
877  //
878  // Pend the general interrupt.
879  //
880  HWREG(g_pui32PendRegs[(ui32Interrupt - 16) / 32]) =
881  1 << ((ui32Interrupt - 16) & 31);
882  }
883 }
884 
885 //*****************************************************************************
886 //
909 //
910 //*****************************************************************************
911 void
912 IntPendClear(uint32_t ui32Interrupt)
913 {
914  //
915  // Check the arguments.
916  //
917  ASSERT(ui32Interrupt < NUM_INTERRUPTS);
918 
919  //
920  // Determine the interrupt to unpend.
921  //
922  if(ui32Interrupt == FAULT_PENDSV)
923  {
924  //
925  // Unpend the PendSV interrupt.
926  //
928  }
929  else if(ui32Interrupt == FAULT_SYSTICK)
930  {
931  //
932  // Unpend the SysTick interrupt.
933  //
935  }
936  else if(ui32Interrupt >= 16)
937  {
938  //
939  // Unpend the general interrupt.
940  //
941  HWREG(g_pui32UnpendRegs[(ui32Interrupt - 16) / 32]) =
942  1 << ((ui32Interrupt - 16) & 31);
943  }
944 }
945 
946 //*****************************************************************************
947 //
975 //
976 //*****************************************************************************
977 void
978 IntPriorityMaskSet(uint32_t ui32PriorityMask)
979 {
980  //
981  // Set the priority mask.
982  //
983  CPUbasepriSet(ui32PriorityMask);
984 }
985 
986 //*****************************************************************************
987 //
1012 //
1013 //*****************************************************************************
1014 uint32_t
1016 {
1017  //
1018  // Return the current priority mask.
1019  //
1020  return(CPUbasepriGet());
1021 }
1022 
1023 //*****************************************************************************
1024 //
1039 //
1040 //*****************************************************************************
1041 void
1042 IntTrigger(uint32_t ui32Interrupt)
1043 {
1044  //
1045  // Check the arguments.
1046  //
1047  ASSERT((ui32Interrupt >= 16) && (ui32Interrupt < NUM_INTERRUPTS));
1048 
1049  //
1050  // Trigger this interrupt.
1051  //
1052  HWREG(NVIC_SW_TRIG) = ui32Interrupt - 16;
1053 }
1054 
1055 //*****************************************************************************
1056 //
1057 // Close the Doxygen group.
1059 //
1060 //*****************************************************************************
#define NVIC_INT_CTRL
Definition: hw_nvic.h:114
#define NVIC_PRI32
Definition: hw_nvic.h:110
#define NVIC_UNPEND3
Definition: hw_nvic.h:71
#define NVIC_INT_CTRL_NMI_SET
Definition: hw_nvic.h:885
#define NVIC_PRI15
Definition: hw_nvic.h:93
#define NVIC_PRI18
Definition: hw_nvic.h:96
#define NVIC_PRI22
Definition: hw_nvic.h:100
#define NVIC_PRI24
Definition: hw_nvic.h:102
int32_t IntPriorityGet(uint32_t ui32Interrupt)
Definition: interrupt.c:570
#define NVIC_SYS_PRI3
Definition: hw_nvic.h:122
#define NVIC_EN2
Definition: hw_nvic.h:55
#define NVIC_PRI19
Definition: hw_nvic.h:97
#define NVIC_PRI3
Definition: hw_nvic.h:81
#define NVIC_APINT
Definition: hw_nvic.h:116
static const uint32_t g_pui32Regs[]
Definition: interrupt.c:75
#define FAULT_NMI
Definition: hw_ints.h:49
#define NUM_PRIORITY
Definition: hw_ints.h:488
#define NVIC_PEND1
Definition: hw_nvic.h:64
#define NVIC_APINT_PRIGROUP_3_5
Definition: hw_nvic.h:934
#define NVIC_PRI6
Definition: hw_nvic.h:84
#define HWREG(x)
Definition: hw_types.h:48
#define NVIC_PEND0
Definition: hw_nvic.h:63
#define NVIC_PRI27
Definition: hw_nvic.h:105
#define FAULT_SYSTICK
Definition: hw_ints.h:57
#define NVIC_APINT_PRIGROUP_4_4
Definition: hw_nvic.h:933
#define NVIC_APINT_PRIGROUP_M
Definition: hw_nvic.h:929
void IntPendClear(uint32_t ui32Interrupt)
Definition: interrupt.c:912
#define NVIC_DIS1
Definition: hw_nvic.h:59
#define NVIC_PRI25
Definition: hw_nvic.h:103
#define NVIC_INT_CTRL_UNPEND_SV
Definition: hw_nvic.h:887
#define NVIC_SW_TRIG
Definition: hw_nvic.h:148
static void _IntDefaultHandler(void)
Definition: interrupt.c:147
#define NVIC_INT_CTRL_PENDSTSET
Definition: hw_nvic.h:888
#define NVIC_ST_CTRL
Definition: hw_nvic.h:49
void IntPriorityGroupingSet(uint32_t ui32Bits)
Definition: interrupt.c:421
#define NVIC_PRI34
Definition: hw_nvic.h:112
uint32_t CPUbasepriGet(void)
#define ASSERT(expr)
Definition: debug.h:67
#define NVIC_PEND3
Definition: hw_nvic.h:66
static const uint32_t g_pui32PendRegs[]
Definition: interrupt.c:116
#define NVIC_PRI5
Definition: hw_nvic.h:83
#define FAULT_MPU
Definition: hw_ints.h:51
#define NVIC_UNPEND0
Definition: hw_nvic.h:68
uint32_t CPUcpsid(void)
#define FAULT_BUS
Definition: hw_ints.h:52
#define NVIC_SYS_HND_CTRL_BUS
Definition: hw_nvic.h:1004
#define NVIC_PRI20
Definition: hw_nvic.h:98
void IntPriorityMaskSet(uint32_t ui32PriorityMask)
Definition: interrupt.c:978
#define NVIC_PEND4
Definition: hw_nvic.h:67
uint32_t IntPriorityGroupingGet(void)
Definition: interrupt.c:455
#define NVIC_SYS_PRI1
Definition: hw_nvic.h:120
#define NVIC_APINT_PRIGROUP_5_3
Definition: hw_nvic.h:932
#define NVIC_PRI29
Definition: hw_nvic.h:107
#define NVIC_EN3
Definition: hw_nvic.h:56
#define NVIC_DIS4
Definition: hw_nvic.h:62
#define NVIC_PRI13
Definition: hw_nvic.h:91
void IntPendSet(uint32_t ui32Interrupt)
Definition: interrupt.c:844
#define NVIC_INT_CTRL_PEND_SV
Definition: hw_nvic.h:886
#define NVIC_APINT_PRIGROUP_0_8
Definition: hw_nvic.h:937
#define NVIC_VTABLE
Definition: hw_nvic.h:115
#define NVIC_PRI9
Definition: hw_nvic.h:87
#define NVIC_UNPEND1
Definition: hw_nvic.h:69
#define NVIC_SYS_HND_CTRL_USAGE
Definition: hw_nvic.h:1003
#define NVIC_PRI7
Definition: hw_nvic.h:85
#define NVIC_SYS_HND_CTRL
Definition: hw_nvic.h:123
#define NVIC_APINT_PRIGROUP_6_2
Definition: hw_nvic.h:931
void IntTrigger(uint32_t ui32Interrupt)
Definition: interrupt.c:1042
#define NVIC_ST_CTRL_INTEN
Definition: hw_nvic.h:174
#define NVIC_PRI21
Definition: hw_nvic.h:99
#define NVIC_PRI17
Definition: hw_nvic.h:95
#define NVIC_APINT_PRIGROUP_1_7
Definition: hw_nvic.h:936
#define NVIC_EN0
Definition: hw_nvic.h:53
static const uint32_t g_pui32Dii16Regs[]
Definition: interrupt.c:105
#define NUM_INTERRUPTS
Definition: interrupt.c:172
#define NVIC_UNPEND2
Definition: hw_nvic.h:70
static __attribute__((section("vtable")))
Definition: interrupt.c:184
#define NVIC_SYS_PRI2
Definition: hw_nvic.h:121
#define NVIC_PRI28
Definition: hw_nvic.h:106
#define NVIC_PRI0
Definition: hw_nvic.h:78
#define NVIC_SYS_HND_CTRL_MEM
Definition: hw_nvic.h:1005
#define NVIC_DIS2
Definition: hw_nvic.h:60
#define NVIC_APINT_VECTKEY
Definition: hw_nvic.h:927
#define NVIC_PRI2
Definition: hw_nvic.h:80
#define NVIC_PRI1
Definition: hw_nvic.h:79
bool IntMasterDisable(void)
Definition: interrupt.c:249
bool IntMasterEnable(void)
#define NVIC_PRI12
Definition: hw_nvic.h:90
#define NVIC_INT_CTRL_PENDSTCLR
Definition: hw_nvic.h:889
uint32_t CPUcpsie(void)
#define NVIC_PRI30
Definition: hw_nvic.h:108
#define NVIC_PRI33
Definition: hw_nvic.h:111
#define NVIC_PRI31
Definition: hw_nvic.h:109
#define NVIC_PRI10
Definition: hw_nvic.h:88
#define NVIC_DIS3
Definition: hw_nvic.h:61
static const uint32_t g_pui32UnpendRegs[]
Definition: interrupt.c:128
void IntUnregister(uint32_t ui32Interrupt)
Definition: interrupt.c:381
#define NVIC_PRI16
Definition: hw_nvic.h:94
void IntPrioritySet(uint32_t ui32Interrupt, uint8_t ui8Priority)
Definition: interrupt.c:527
#define NVIC_PEND2
Definition: hw_nvic.h:65
static const uint32_t g_pui32Priority[]
Definition: interrupt.c:62
#define NVIC_PRI8
Definition: hw_nvic.h:86
void CPUbasepriSet(uint32_t ui32NewBasepri)
static const uint32_t g_pui32EnRegs[]
Definition: interrupt.c:93
#define NVIC_UNPEND4
Definition: hw_nvic.h:72
#define NVIC_EN4
Definition: hw_nvic.h:57
#define FAULT_USAGE
Definition: hw_ints.h:53
#define NVIC_PRI11
Definition: hw_nvic.h:89
#define NVIC_PRI26
Definition: hw_nvic.h:104
uint32_t IntIsEnabled(uint32_t ui32Interrupt)
Definition: interrupt.c:759
#define NVIC_APINT_PRIGROUP_2_6
Definition: hw_nvic.h:935
#define NVIC_PRI14
Definition: hw_nvic.h:92
#define NVIC_PRI4
Definition: hw_nvic.h:82
#define NVIC_APINT_PRIGROUP_7_1
Definition: hw_nvic.h:930
#define NVIC_EN1
Definition: hw_nvic.h:54
#define FAULT_PENDSV
Definition: hw_ints.h:56
uint32_t IntPriorityMaskGet(void)
Definition: interrupt.c:1015
void IntDisable(uint32_t ui32Interrupt)
Definition: interrupt.c:684
void IntRegister(uint32_t ui32Interrupt, void(*pfnHandler)(void))
Definition: interrupt.c:309
#define NVIC_DIS0
Definition: hw_nvic.h:58
void IntEnable(uint32_t ui32Interrupt)
Definition: interrupt.c:610
#define NVIC_PRI23
Definition: hw_nvic.h:101