Infineon MOTIX™ MCU TLE988x/9x Device Family SDK
cmsis_misra.h
Go to the documentation of this file.
1 /*
2  ***********************************************************************************************************************
3  *
4  * Copyright (c) Infineon Technologies AG
5  * All rights reserved.
6  *
7  * Redistribution and use in source and binary forms, with or without modification,are permitted provided that the
8  * following conditions are met:
9  *
10  * Redistributions of source code must retain the above copyright notice, this list of conditions and the following
11  * disclaimer.
12  *
13  * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the
14  * following disclaimer in the documentation and/or other materials provided with the distribution.
15  *
16  * Neither the name of the copyright holders nor the names of its contributors may be used to endorse or promote
17  * products derived from this software without specific prior written permission.
18  *
19  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
20  * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
21  * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
22  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
23  * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
24  * WHETHER IN CONTRACT, STRICT LIABILITY,OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
25  * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26  *
27  **********************************************************************************************************************/
39 /*******************************************************************************
40 ** Author(s) Identity **
41 ********************************************************************************
42 ** Initials Name **
43 ** ---------------------------------------------------------------------------**
44 ** DM Daniel Mysliwitz **
45 ** BG Blandine Guillot **
46 ** JO Julia Ott **
47 *******************************************************************************/
48 
49 /*******************************************************************************
50 ** Revision Control History **
51 ********************************************************************************
52 ** V0.1.0: 2018-06-13, DM: Initial version **
53 ** V0.1.1: 2019-04-18, JO: Modified CMSIS_Irq_Dis to be ARM GCC compliant **
54 ** V0.2.0: 2020-04-28, BG: Added SEV function **
55 ** Updated revision history format **
56 ** V0.2.1: 2021-05-20, JO: EP-821: Updated CMSIS_Irq_Dis to prevent **
57 ** compiler warning **
58 ** V0.2.2: 2021-07-07, JO: EP-783: Added CMSIS_SEV for TESTING condition **
59 ** V0.2.3: 2021-07-30, BG: EP-877: Corrected CMSIS_Irq_Dis to prevent **
60 ** ARMCC v6 compiler error **
61 ** V0.2.4: 2021-11-12, JO: EP-937: Updated copyright and branding **
62 *******************************************************************************/
63 
64 #ifndef _CMSIS_MISRA_H
65 #define _CMSIS_MISRA_H
66 
67 /*******************************************************************************
68 ** Includes **
69 *******************************************************************************/
70 #include "types.h"
71 #include "core_cm3.h"
72 
73 /*******************************************************************************
74 ** Unit Test Declarations **
75 *******************************************************************************/
76 
77 #if defined(TESTING) || defined(UNIT_TESTING_LV2)
78 
79 sint32 CMSIS_Irq_Dis(void);
80 void CMSIS_Irq_En(void);
81 void CMSIS_NOP(void);
82 void CMSIS_WFE(void);
83 void CMSIS_SEV(void);
84 
85 #else
86 
87 /*******************************************************************************
88 ** Global Inline Function Declarations **
89 *******************************************************************************/
90 
95 
99 INLINE void CMSIS_Irq_En(void);
100 
104 INLINE void CMSIS_NOP(void);
105 
109 INLINE void CMSIS_WFE(void);
110 
114 INLINE void CMSIS_SEV(void);
115 
116 
117 /*******************************************************************************
118 ** Global Inline Function Definitions **
119 *******************************************************************************/
120 
122 {
123  /* violation: Symbol '__disable_irq' undeclared, assumed to return int [MISRA Rule 20], [MISRA Rule 71]*/
124  /* violation: call to function '__disable_irq()' not made in the presence of a prototype [MISRA Rule 71] */
125  __disable_irq();
126  return 0;
127 }
128 
130 {
131  /* violation: Symbol '__enable_irq' undeclared, assumed to return int [MISRA Rule 20], [MISRA Rule 71]*/
132  /* violation: call to function '__enable_irq()' not made in the presence of a prototype [MISRA Rule 71] */
133  __enable_irq();
134 }
135 
136 INLINE void CMSIS_NOP(void)
137 {
138  /* violation: Symbol '__nop' undeclared, assumed to return int [MISRA Rule 20], [MISRA Rule 71]*/
139  /* violation: call to function '__nop()' not made in the presence of a prototype [MISRA Rule 71] */
140  __NOP();
141 }
142 
143 INLINE void CMSIS_WFE(void)
144 {
145  /* violation: Symbol '__wfe' undeclared, assumed to return int [MISRA Rule 20], [MISRA Rule 71]*/
146  /* violation: call to function '__wfe()' not made in the presence of a prototype [MISRA Rule 71] */
147  __WFE();
148 }
149 
150 INLINE void CMSIS_SEV(void)
151 {
152  /* violation: Symbol '__sev' undeclared, assumed to return int [MISRA Rule 20], [MISRA Rule 71]*/
153  /* violation: call to function '__sev()' not made in the presence of a prototype [MISRA Rule 71] */
154  __SEV();
155 }
156 
157 #endif
158 
159 
160 #endif /*_CMSIS_MISRA_H*/
INLINE sint32 CMSIS_Irq_Dis(void)
Access to the CMSIS intrinsic __disable_irq().
Definition: cmsis_misra.h:121
INLINE void CMSIS_NOP(void)
Access to the CMSIS intrinsic __NOP().
Definition: cmsis_misra.h:136
INLINE void CMSIS_Irq_En(void)
Access to the CMSIS intrinsic __enable_irq().
Definition: cmsis_misra.h:129
INLINE void CMSIS_SEV(void)
Access to the CMSIS intrinsic __SEV().
Definition: cmsis_misra.h:150
INLINE void CMSIS_WFE(void)
Access to the CMSIS intrinsic __WFE().
Definition: cmsis_misra.h:143
General type declarations.
#define INLINE
Definition: types.h:167
int32_t sint32
32 bit signed value
Definition: types.h:227