arch/z[80|16]: Move up_getsp declaration to arch.h

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
Xiang Xiao 2022-03-12 23:10:27 +08:00 committed by Petro Karashchenko
parent e8213b9ae5
commit 1a7f49eeb3
4 changed files with 23 additions and 8 deletions

View File

@ -29,6 +29,8 @@
* Included Files * Included Files
****************************************************************************/ ****************************************************************************/
#include <arch/irq.h>
/**************************************************************************** /****************************************************************************
* Pre-processor Definitions * Pre-processor Definitions
****************************************************************************/ ****************************************************************************/
@ -57,6 +59,10 @@ extern "C"
#define EXTERN extern #define EXTERN extern
#endif #endif
/* Return the current value of the stack pointer */
chipreg_t up_getsp(void);
#undef EXTERN #undef EXTERN
#ifdef __cplusplus #ifdef __cplusplus
} }

View File

@ -164,10 +164,6 @@ void z16_netinitialize(void);
# define z16_netinitialize() # define z16_netinitialize()
#endif #endif
/* Return the current value of the stack pointer (used in stack dump logic) */
chipreg_t up_getsp(void);
/* Dump stack and registers */ /* Dump stack and registers */
#ifdef CONFIG_ARCH_STACKDUMP #ifdef CONFIG_ARCH_STACKDUMP

View File

@ -51,4 +51,21 @@
* Public Function Prototypes * 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 */ #endif /* __ARCH_Z80_INCLUDE_ARCH_H */

View File

@ -134,10 +134,6 @@ int up_multicastfilter(FAR struct net_driver_s *dev, FAR uint8_t *mac,
# define up_multicastfilter(dev, mac, enable) # define up_multicastfilter(dev, mac, enable)
#endif #endif
/* Return the current value of the stack pointer (used in stack dump logic) */
uintptr_t up_getsp(void);
/* Dump stack and registers */ /* Dump stack and registers */
#ifdef CONFIG_ARCH_STACKDUMP #ifdef CONFIG_ARCH_STACKDUMP