aboutsummaryrefslogtreecommitdiffstats
path: root/os/ports/GCC/ARMCMx/chcore.h
diff options
context:
space:
mode:
Diffstat (limited to 'os/ports/GCC/ARMCMx/chcore.h')
-rw-r--r--os/ports/GCC/ARMCMx/chcore.h14
1 files changed, 6 insertions, 8 deletions
diff --git a/os/ports/GCC/ARMCMx/chcore.h b/os/ports/GCC/ARMCMx/chcore.h
index 9db7c816a..16703ddcc 100644
--- a/os/ports/GCC/ARMCMx/chcore.h
+++ b/os/ports/GCC/ARMCMx/chcore.h
@@ -105,7 +105,7 @@
* a stack frame when compiling without optimizations. You may
* reduce this value to zero when compiling with optimizations.
*/
-#ifndef PORT_IDLE_THREAD_STACK_SIZE
+#if !defined(PORT_IDLE_THREAD_STACK_SIZE)
#define PORT_IDLE_THREAD_STACK_SIZE 16
#endif
@@ -120,14 +120,14 @@
* @p chSchDoReschedule() can have a stack frame, expecially with
* compiler optimizations disabled.
*/
-#ifndef PORT_INT_REQUIRED_STACK
+#if !defined(PORT_INT_REQUIRED_STACK)
#define PORT_INT_REQUIRED_STACK 16
#endif
/**
* @brief Enables the use of the WFI instruction in the idle thread loop.
*/
-#ifndef CORTEX_ENABLE_WFI_IDLE
+#if !defined(CORTEX_ENABLE_WFI_IDLE)
#define CORTEX_ENABLE_WFI_IDLE FALSE
#endif
@@ -136,14 +136,12 @@
* @note The default SYSTICK handler priority is calculated as the priority
* level in the middle of the numeric priorities range.
*/
-#ifndef CORTEX_PRIORITY_SYSTICK
+#if !defined(CORTEX_PRIORITY_SYSTICK)
#define CORTEX_PRIORITY_SYSTICK (CORTEX_PRIORITY_LEVELS >> 1)
-#else
+#elif !CORTEX_IS_VALID_PRIORITY(CORTEX_PRIORITY_SYSTICK)
/* If it is externally redefined then better perform a validity check on it.*/
-#if !CORTEX_IS_VALID_PRIORITY(CORTEX_PRIORITY_SYSTICK)
#error "invalid priority level specified for CORTEX_PRIORITY_SYSTICK"
#endif
-#endif
/**
* @brief Stack alignment enforcement.
@@ -152,7 +150,7 @@
* binary compatibility with EABI compiled libraries.
* @note Allowed values are 32 or 64.
*/
-#ifndef CORTEX_STACK_ALIGNMENT
+#if !defined(CORTEX_STACK_ALIGNMENT)
#define CORTEX_STACK_ALIGNMENT 64
#endif