1 /*
2  * Copyright (c) 2020 Nordic Semiconductor ASA
3  *
4  * SPDX-License-Identifier: Apache-2.0
5  */
6 
7 /* Provides a minimalistic nrfx_config to be used with Nordic nrfx and bsim.
8  */
9 
10 #ifndef NRFX_CONFIG_BSIM_H__
11 #define NRFX_CONFIG_BSIM_H__
12 
13 /* When the real nrfx HAL headers are included, this header will be included
14  * from them, with the two definitions below. The normal users of the nrfx HAL
15  * will only get the prototype of the functions from the real headers.
16  * The HW models, will include again the real nrfx headers once more,
17  * but setting NRF_DONT_DECLARE_ONLY, and replacing NRF_STATIC_INLINE.
18  * In this way, the HW models will include 1 copy of the functions bodies,
19  * but as normal, globally available functions, instead of inlined versions.
20  * (See src/nrfx/hal/nrf_hal_originals.c for more info)
21  */
22 #ifndef NRF_DONT_DECLARE_ONLY
23 #define NRF_DECLARE_ONLY
24 #endif
25 
26 #ifndef NRF_STATIC_INLINE
27 #define NRF_STATIC_INLINE
28 #endif
29 
30 /*
31  * When nrfx drivers are compiled for a real SoC, this macro is inherited from
32  * CMSIS. The below definition is needed when those drivers are compiled for
33  * the simulated target.
34  */
35 #ifndef __STATIC_INLINE
36 #define __STATIC_INLINE static inline
37 #endif
38 
39 /*
40  * Suppress use of anomaly workarounds in nrfx drivers that would directly
41  * access hardware registers.
42  */
43 #define USE_WORKAROUND_FOR_ANOMALY_132 0
44 
45 #endif // NRFX_CONFIG_BSIM_H__
46 
47