diff options
Diffstat (limited to 'os/common/ports/templates')
-rw-r--r-- | os/common/ports/templates/chcore.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/os/common/ports/templates/chcore.h b/os/common/ports/templates/chcore.h index 98c4b9502..e3dc48d8e 100644 --- a/os/common/ports/templates/chcore.h +++ b/os/common/ports/templates/chcore.h @@ -248,14 +248,22 @@ struct port_context { * @note @p id can be a function name or a vector number depending on the
* port implementation.
*/
+#ifdef __cplusplus
+#define PORT_IRQ_HANDLER(id) extern "C" void id(void)
+#else
#define PORT_IRQ_HANDLER(id) void id(void)
+#endif
/**
* @brief Fast IRQ handler function declaration.
* @note @p id can be a function name or a vector number depending on the
* port implementation.
*/
+#ifdef __cplusplus
+#define PORT_FAST_IRQ_HANDLER(id) extern "C" void id(void)
+#else
#define PORT_FAST_IRQ_HANDLER(id) void id(void)
+#endif
/**
* @brief Performs a context switch between two threads.
|