soc/arm/arm: rearrange for standard use of extern "C"

Move the tail include file outside the extern "C" block.

Background from issue #17997:

Declarations that use C linkage should be placed within extern "C"
so the language linkage is correct when the header is included by
a C++ compiler.

Similarly #include directives should be outside the extern "C" to
ensure the language-specific default linkage is applied to any
declarations provided by the included header.

See: https://en.cppreference.com/w/cpp/language/language_linkage
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
This commit is contained in:
Peter Bigot 2019-08-12 16:51:31 -05:00 committed by Ioannis Glaropoulos
commit 8101ca8f2c
3 changed files with 6 additions and 8 deletions

View file

@ -92,10 +92,10 @@ typedef enum IRQn
#define __NVIC_PRIO_BITS 3 /* Number of Bits used for Priority Levels */
#define __Vendor_SysTickConfig 0 /* Set to 1 if different SysTick Config is used */
#include <core_cm3.h> /* Processor and core peripherals */
#ifdef __cplusplus
}
#endif
#include <core_cm3.h> /* Processor and core peripherals */
#endif /* CMSDK_BEETLE_H */

View file

@ -131,11 +131,10 @@ typedef enum IRQn {
#define __FPU_PRESENT 0U /* no FPU present */
#define __DSP_PRESENT 0U /* no DSP extension present */
#include <core_cm33.h> /*!< ARM Cortex-M33 processor and core peripherals */
#ifdef __cplusplus
}
#endif
#include <core_cm33.h> /*!< ARM Cortex-M33 processor and core peripherals */
#endif /* SYSTEM_CMSDK_MUSCA_H */

View file

@ -131,11 +131,10 @@ typedef enum IRQn {
#define __FPU_PRESENT 0U /* no FPU present */
#define __DSP_PRESENT 0U /* no DSP extension present */
#include <core_cm33.h> /*!< ARM Cortex-M33 processor and core peripherals */
#ifdef __cplusplus
}
#endif
#include <core_cm33.h> /*!< ARM Cortex-M33 processor and core peripherals */
#endif /* SYSTEM_CMSDK_MUSCA_B1_H */