You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by pk...@apache.org on 2022/03/12 17:22:07 UTC
[incubator-nuttx] branch master updated: arch/z[80|16]: Move up_getsp declaration to arch.h
This is an automated email from the ASF dual-hosted git repository.
pkarashchenko pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git
The following commit(s) were added to refs/heads/master by this push:
new 1a7f49e arch/z[80|16]: Move up_getsp declaration to arch.h
1a7f49e is described below
commit 1a7f49eeb301057f6202578a5cdde8720431bf29
Author: Xiang Xiao <xi...@xiaomi.com>
AuthorDate: Sat Mar 12 23:10:27 2022 +0800
arch/z[80|16]: Move up_getsp declaration to arch.h
Signed-off-by: Xiang Xiao <xi...@xiaomi.com>
---
arch/z16/include/arch.h | 6 ++++++
arch/z16/src/common/z16_internal.h | 4 ----
arch/z80/include/arch.h | 17 +++++++++++++++++
arch/z80/src/common/z80_internal.h | 4 ----
4 files changed, 23 insertions(+), 8 deletions(-)
diff --git a/arch/z16/include/arch.h b/arch/z16/include/arch.h
index f6db60d..d3da587 100644
--- a/arch/z16/include/arch.h
+++ b/arch/z16/include/arch.h
@@ -29,6 +29,8 @@
* Included Files
****************************************************************************/
+#include <arch/irq.h>
+
/****************************************************************************
* Pre-processor Definitions
****************************************************************************/
@@ -57,6 +59,10 @@ extern "C"
#define EXTERN extern
#endif
+/* Return the current value of the stack pointer */
+
+chipreg_t up_getsp(void);
+
#undef EXTERN
#ifdef __cplusplus
}
diff --git a/arch/z16/src/common/z16_internal.h b/arch/z16/src/common/z16_internal.h
index 75db710..ca72a21 100644
--- a/arch/z16/src/common/z16_internal.h
+++ b/arch/z16/src/common/z16_internal.h
@@ -164,10 +164,6 @@ void z16_netinitialize(void);
# define z16_netinitialize()
#endif
-/* Return the current value of the stack pointer (used in stack dump logic) */
-
-chipreg_t up_getsp(void);
-
/* Dump stack and registers */
#ifdef CONFIG_ARCH_STACKDUMP
diff --git a/arch/z80/include/arch.h b/arch/z80/include/arch.h
index b2a4b89..ac3a93b 100644
--- a/arch/z80/include/arch.h
+++ b/arch/z80/include/arch.h
@@ -51,4 +51,21 @@
* Public Function Prototypes
****************************************************************************/
+#ifdef __cplusplus
+#define EXTERN extern "C"
+extern "C"
+{
+#else
+#define EXTERN extern
+#endif
+
+/* Return the current value of the stack pointer */
+
+uintptr_t up_getsp(void);
+
+#undef EXTERN
+#ifdef __cplusplus
+}
+#endif
+
#endif /* __ARCH_Z80_INCLUDE_ARCH_H */
diff --git a/arch/z80/src/common/z80_internal.h b/arch/z80/src/common/z80_internal.h
index f4f8928..d9fa7d1 100644
--- a/arch/z80/src/common/z80_internal.h
+++ b/arch/z80/src/common/z80_internal.h
@@ -134,10 +134,6 @@ int up_multicastfilter(FAR struct net_driver_s *dev, FAR uint8_t *mac,
# define up_multicastfilter(dev, mac, enable)
#endif
-/* Return the current value of the stack pointer (used in stack dump logic) */
-
-uintptr_t up_getsp(void);
-
/* Dump stack and registers */
#ifdef CONFIG_ARCH_STACKDUMP