diff options
author | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2010-12-02 20:33:08 +0000 |
---|---|---|
committer | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2010-12-02 20:33:08 +0000 |
commit | e6d3a23b9e6736cf9178086a78a6ed2008f671f9 (patch) | |
tree | 515231a5c9d8e14d8a3574db5e307ae8d3ae9702 /os/ports/GCC/ARM | |
parent | 68b05c757a60ba3bddbfb76d02b992f96d1e63f9 (diff) | |
download | ChibiOS-e6d3a23b9e6736cf9178086a78a6ed2008f671f9.tar.gz ChibiOS-e6d3a23b9e6736cf9178086a78a6ed2008f671f9.tar.bz2 ChibiOS-e6d3a23b9e6736cf9178086a78a6ed2008f671f9.zip |
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@2454 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/ports/GCC/ARM')
-rw-r--r-- | os/ports/GCC/ARM/chcore.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/os/ports/GCC/ARM/chcore.h b/os/ports/GCC/ARM/chcore.h index a532e7048..62edefac1 100644 --- a/os/ports/GCC/ARM/chcore.h +++ b/os/ports/GCC/ARM/chcore.h @@ -244,6 +244,7 @@ struct context { * value. The switch in THUMB mode is done in the function prologue so
* it is transparent to the user code.
*/
+#if !defined(PORT_IRQ_PROLOGUE)
#ifdef THUMB
#define PORT_IRQ_PROLOGUE() { \
asm volatile (".code 32 \n\t" \
@@ -257,6 +258,7 @@ struct context { asm volatile ("stmfd sp!, {r0-r3, r12, lr}" : : : "memory"); \
}
#endif /* !THUMB */
+#endif /* !defined(PORT_IRQ_PROLOGUE) */
/**
* @brief IRQ epilogue code.
@@ -265,6 +267,7 @@ struct context { * @note This macro has a different implementation depending if compiled in
* ARM or THUMB mode.
*/
+#if !defined(PORT_IRQ_EPILOGUE)
#ifdef THUMB
#define PORT_IRQ_EPILOGUE() { \
asm volatile ("ldr r0, =_port_irq_common \n\t" \
@@ -275,21 +278,26 @@ struct context { asm volatile ("b _port_irq_common" : : : "memory"); \
}
#endif /* !THUMB */
+#endif /* !defined(PORT_IRQ_EPILOGUE) */
/**
* @brief IRQ handler function declaration.
* @note @p id can be a function name or a vector number depending on the
* port implementation.
*/
+#if !defined(PORT_IRQ_HANDLER)
#define PORT_IRQ_HANDLER(id) __attribute__((naked)) void id(void)
+#endif /* !defined(PORT_IRQ_HANDLER) */
/**
* @brief Fast IRQ handler function declaration.
* @note @p id can be a function name or a vector number depending on the
* port implementation.
*/
+#if !defined(PORT_FAST_IRQ_HANDLER)
#define PORT_FAST_IRQ_HANDLER(id) \
__attribute__((interrupt("FIQ"))) void id(void)
+#endif /* !defined(PORT_FAST_IRQ_HANDLER) */
/**
* @brief Port-related initialization code.
|