1 /*
2  * Copyright (c) 2020 Oticon A/S
3  *
4  * SPDX-License-Identifier: Apache-2.0
5  */
6 
7 /**
8  * This header defines replacements for inline
9  * ARM Cortex-M CMSIS intrinsics.
10  */
11 
12 #ifndef BOARDS_POSIX_NRF52_BSIM_CMSIS_H
13 #define BOARDS_POSIX_NRF52_BSIM_CMSIS_H
14 
15 #include <stdint.h>
16 #include "cmsis_instr.h"
17 #if defined(CONFIG_SOC_COMPATIBLE_NRF52833)
18 #include "nrf52833.h"
19 #endif
20 
21 #ifdef __cplusplus
22 extern "C" {
23 #endif
24 
25 void __enable_irq(void);
26 void __disable_irq(void);
27 uint32_t __get_PRIMASK(void);
28 void __set_PRIMASK(uint32_t primask);
29 
30 void NVIC_SetPendingIRQ(IRQn_Type IRQn);
31 void NVIC_ClearPendingIRQ(IRQn_Type IRQn);
32 void NVIC_DisableIRQ(IRQn_Type IRQn);
33 uint32_t NVIC_GetPendingIRQ(IRQn_Type IRQn);
34 void NVIC_EnableIRQ(IRQn_Type IRQn);
35 void NVIC_SetPriority(IRQn_Type IRQn, uint32_t priority);
36 uint32_t NVIC_GetPriority(IRQn_Type IRQn);
37 void NVIC_SystemReset(void);
38 
39 #ifdef __cplusplus
40 }
41 #endif
42 
43 #endif /* BOARDS_POSIX_NRF52_BSIM_CMSIS_H */
44