diff options
Diffstat (limited to 'lib/chibios-contrib/os/common/startup/ARMCMx/devices/NRF52832/cmparams.h')
-rw-r--r-- | lib/chibios-contrib/os/common/startup/ARMCMx/devices/NRF52832/cmparams.h | 82 |
1 files changed, 82 insertions, 0 deletions
diff --git a/lib/chibios-contrib/os/common/startup/ARMCMx/devices/NRF52832/cmparams.h b/lib/chibios-contrib/os/common/startup/ARMCMx/devices/NRF52832/cmparams.h new file mode 100644 index 000000000..03c7955e3 --- /dev/null +++ b/lib/chibios-contrib/os/common/startup/ARMCMx/devices/NRF52832/cmparams.h | |||
@@ -0,0 +1,82 @@ | |||
1 | /* | ||
2 | Copyright (C) 2016 Stephane D'Alu | ||
3 | |||
4 | This file is part of ChibiOS. | ||
5 | |||
6 | ChibiOS is free software; you can redistribute it and/or modify | ||
7 | it under the terms of the GNU General Public License as published by | ||
8 | the Free Software Foundation; either version 3 of the License, or | ||
9 | (at your option) any later version. | ||
10 | |||
11 | ChibiOS is distributed in the hope that it will be useful, | ||
12 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
14 | GNU General Public License for more details. | ||
15 | |||
16 | You should have received a copy of the GNU General Public License | ||
17 | along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
18 | */ | ||
19 | |||
20 | /** | ||
21 | * @file NRF51822/cmparams.h | ||
22 | * @brief ARM Cortex-M4 parameters for the Nordic Semi NRF52832 family. | ||
23 | * | ||
24 | * @defgroup ARMCMx_NRF52x Nordic semiconductor NRF52x. | ||
25 | * @ingroup ARMCMx_SPECIFIC | ||
26 | * @details This file contains the Cortex-M4 specific parameters for the | ||
27 | * NRF52x platform. | ||
28 | * @{ | ||
29 | */ | ||
30 | |||
31 | #ifndef _CMPARAMS_H_ | ||
32 | #define _CMPARAMS_H_ | ||
33 | |||
34 | /** | ||
35 | * @brief Cortex core model. | ||
36 | */ | ||
37 | #define CORTEX_MODEL 4 | ||
38 | |||
39 | /** | ||
40 | * @brief Memory Protection unit presence. | ||
41 | */ | ||
42 | #define CORTEX_HAS_MPU 1 | ||
43 | |||
44 | /** | ||
45 | * @brief Floating Point unit presence. | ||
46 | */ | ||
47 | #define CORTEX_HAS_FPU 1 | ||
48 | |||
49 | /** | ||
50 | * @brief Number of bits in priority masks. | ||
51 | */ | ||
52 | #define CORTEX_PRIORITY_BITS 3 | ||
53 | |||
54 | /** | ||
55 | * @brief Number of interrupt vectors. | ||
56 | * @note This number does not include the 16 system vectors and must be | ||
57 | * rounded to a multiple of 8. | ||
58 | */ | ||
59 | #define CORTEX_NUM_VECTORS 40 | ||
60 | |||
61 | /* The following code is not processed when the file is included from an | ||
62 | asm module.*/ | ||
63 | #if !defined(_FROM_ASM_) | ||
64 | |||
65 | /* Including the device CMSIS header. Note, we are not using the definitions | ||
66 | from this header because we need this file to be usable also from | ||
67 | assembler source files. We verify that the info matches instead.*/ | ||
68 | #include "nrf.h" | ||
69 | |||
70 | #if CORTEX_MODEL != __CORTEX_M | ||
71 | #error "CMSIS __CORTEX_M mismatch" | ||
72 | #endif | ||
73 | |||
74 | #if CORTEX_PRIORITY_BITS != __NVIC_PRIO_BITS | ||
75 | #error "CMSIS __NVIC_PRIO_BITS mismatch" | ||
76 | #endif | ||
77 | |||
78 | #endif /* !defined(_FROM_ASM_) */ | ||
79 | |||
80 | #endif /* _CMPARAMS_H_ */ | ||
81 | |||
82 | /** @} */ | ||