Infineon MOTIX™ MCU TLE987x 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 ** JO Julia Ott **
46 ** BG Blandine Guillot **
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.1.2: 2020-04-15, BG: Updated revision history **
55 ** V0.1.3: 2020-04-17, BG: Added inline function CMSIS_SEV() **
56 ** V0.1.4: 2020-07-21, BG: EP-439: Formatted .h/.c files **
57 ** V0.1.5: 2022-02-17, JO: EP-1040: Corrected CMSIS_Irq_Dis (for ARMCC v6) **
58 ** V0.1.6: 2022-02-28, JO: EP-936: Updated copyright and branding **
59 *******************************************************************************/
60 
61 #ifndef _CMSIS_MISRA_H
62 #define _CMSIS_MISRA_H
63 
64 /*******************************************************************************
65 ** Includes **
66 *******************************************************************************/
67 #include "types.h"
68 #include "core_cm3.h"
69 
70 /*******************************************************************************
71 ** Unit Test Declarations **
72 *******************************************************************************/
73 #if defined(TESTING) || defined(UNIT_TESTING_LV2)
74 
75 sint32 CMSIS_Irq_Dis(void);
76 void CMSIS_Irq_En(void);
77 void CMSIS_NOP(void);
78 void CMSIS_WFE(void);
79 void CMSIS_SEV(void);
80 
81 #else
82 
83 /*******************************************************************************
84 ** Global Function Declarations **
85 *******************************************************************************/
86 
90 INLINE void CMSIS_Irq_Dis(void);
91 
95 INLINE void CMSIS_Irq_En(void);
96 
100 INLINE void CMSIS_NOP(void);
101 
105 INLINE void CMSIS_WFE(void);
106 
110 INLINE void CMSIS_SEV(void);
111 
112 
113 /*******************************************************************************
114 ** Global Function Definitions **
115 *******************************************************************************/
116 
118 {
119  /* violation: Symbol '__disable_irq' undeclared, assumed to return int [MISRA Rule 20], [MISRA Rule 71]*/
120  /* violation: call to function '__disable_irq()' not made in the presence of a prototype [MISRA Rule 71] */
121  (void)__disable_irq();
122 }
123 
125 {
126  /* violation: Symbol '__enable_irq' undeclared, assumed to return int [MISRA Rule 20], [MISRA Rule 71]*/
127  /* violation: call to function '__enable_irq()' not made in the presence of a prototype [MISRA Rule 71] */
128  __enable_irq();
129 }
130 
131 INLINE void CMSIS_NOP(void)
132 {
133  /* violation: Symbol '__nop' undeclared, assumed to return int [MISRA Rule 20], [MISRA Rule 71]*/
134  /* violation: call to function '__nop()' not made in the presence of a prototype [MISRA Rule 71] */
135  __NOP();
136 }
137 
138 INLINE void CMSIS_WFE(void)
139 {
140  /* violation: Symbol '__wfe' undeclared, assumed to return int [MISRA Rule 20], [MISRA Rule 71]*/
141  /* violation: call to function '__wfe()' not made in the presence of a prototype [MISRA Rule 71] */
142  __WFE();
143 }
144 
145 INLINE void CMSIS_SEV(void)
146 {
147  /* violation: Symbol '__sev' undeclared, assumed to return int [MISRA Rule 20], [MISRA Rule 71]*/
148  /* violation: call to function '__sev()' not made in the presence of a prototype [MISRA Rule 71] */
149  __SEV();
150 }
151 
152 #endif
153 
154 
155 #endif /*_CMSIS_MISRA_H*/
INLINE void CMSIS_NOP(void)
Access to the CMSIS intrinsic __NOP().
Definition: cmsis_misra.h:131
INLINE void CMSIS_Irq_En(void)
Access to the CMSIS intrinsic __enable_irq().
Definition: cmsis_misra.h:124
INLINE void CMSIS_SEV(void)
Access to the CMSIS intrinsic __SEV().
Definition: cmsis_misra.h:145
INLINE void CMSIS_WFE(void)
Access to the CMSIS intrinsic __WFE().
Definition: cmsis_misra.h:138
INLINE void CMSIS_Irq_Dis(void)
Access to the CMSIS intrinsic __disable_irq().
Definition: cmsis_misra.h:117
General type declarations.
#define INLINE
Definition: types.h:148
int32_t sint32
32 bit signed value
Definition: types.h:160