forked from nuttx/nuttx-update
sergger: add note_ prefix to sysview
change 1: rename sysview.c to note_sysview.c change 2: add note_ prefix to sysview's public function Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
This commit is contained in:
parent
77466742c7
commit
8f823ce320
5 changed files with 15 additions and 15 deletions
|
@ -67,7 +67,7 @@ int note_initialize(void)
|
|||
#endif
|
||||
|
||||
#ifdef CONFIG_SEGGER_SYSVIEW
|
||||
ret = sysview_initialize();
|
||||
ret = note_sysview_initialize();
|
||||
if (ret < 0)
|
||||
{
|
||||
return ret;
|
||||
|
|
|
@ -66,7 +66,7 @@ ifeq ($(CONFIG_SYSLOG_RTT),y)
|
|||
endif
|
||||
|
||||
ifeq ($(CONFIG_SEGGER_SYSVIEW),y)
|
||||
CSRCS += segger/sysview.c
|
||||
CSRCS += segger/note_sysview.c
|
||||
CSRCS += segger/SystemView/SYSVIEW/SEGGER_SYSVIEW.c
|
||||
|
||||
CFLAGS += ${INCDIR_PREFIX}$(TOPDIR)$(DELIM)sched
|
||||
|
|
|
@ -35,13 +35,13 @@
|
|||
* Call user-supplied function SEGGER_SYSVIEW_X_GetInterruptId().
|
||||
*/
|
||||
|
||||
#define SEGGER_SYSVIEW_GET_INTERRUPT_ID sysview_get_interrupt_id
|
||||
#define SEGGER_SYSVIEW_GET_INTERRUPT_ID note_sysview_get_interrupt_id
|
||||
|
||||
/* Function macro to retrieve a system timestamp for SYSVIEW events.
|
||||
* Call user-supplied function SEGGER_SYSVIEW_X_GetTimestamp().
|
||||
*/
|
||||
|
||||
#define SEGGER_SYSVIEW_GET_TIMESTAMP sysview_get_timestamp
|
||||
#define SEGGER_SYSVIEW_GET_TIMESTAMP note_sysview_get_timestamp
|
||||
|
||||
/* The RTT channel that SystemView will use. */
|
||||
|
||||
|
@ -72,8 +72,8 @@ extern "C"
|
|||
* Public Function Prototypes
|
||||
****************************************************************************/
|
||||
|
||||
unsigned int sysview_get_interrupt_id(void);
|
||||
unsigned int sysview_get_timestamp(void);
|
||||
unsigned int note_sysview_get_interrupt_id(void);
|
||||
unsigned int note_sysview_get_timestamp(void);
|
||||
|
||||
#undef EXTERN
|
||||
#if defined(__cplusplus)
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/****************************************************************************
|
||||
* drivers/segger/sysview.c
|
||||
* drivers/segger/note_sysview.c
|
||||
*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
|
@ -326,33 +326,33 @@ static void note_sysview_syscall_leave(FAR struct note_driver_s *drv,
|
|||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Name: sysview_get_interrupt_id
|
||||
* Name: note_sysview_get_interrupt_id
|
||||
*
|
||||
* Description:
|
||||
* Retrieve the Id of the currently active interrupt.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
unsigned int sysview_get_interrupt_id(void)
|
||||
unsigned int note_sysview_get_interrupt_id(void)
|
||||
{
|
||||
return g_note_sysview_driver.irq[up_cpu_index()];
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* Name: sysview_get_timestamp
|
||||
* Name: note_sysview_get_timestamp
|
||||
*
|
||||
* Description:
|
||||
* Retrieve a system timestamp for SYSVIEW events.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
unsigned int sysview_get_timestamp(void)
|
||||
unsigned int note_sysview_get_timestamp(void)
|
||||
{
|
||||
return up_perf_gettime();
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* Name: sysview_initialize
|
||||
* Name: note_sysview_initialize
|
||||
*
|
||||
* Description:
|
||||
* Initializes the SYSVIEW module.
|
||||
|
@ -365,7 +365,7 @@ unsigned int sysview_get_timestamp(void)
|
|||
*
|
||||
****************************************************************************/
|
||||
|
||||
int sysview_initialize(void)
|
||||
int note_sysview_initialize(void)
|
||||
{
|
||||
uint32_t freq = up_perf_getfreq();
|
||||
|
|
@ -32,7 +32,7 @@
|
|||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Name: sysview_initialize
|
||||
* Name: note_sysview_initialize
|
||||
*
|
||||
* Description:
|
||||
* Initializes the SYSVIEW module.
|
||||
|
@ -46,7 +46,7 @@
|
|||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_SEGGER_SYSVIEW
|
||||
int sysview_initialize(void);
|
||||
int note_sysview_initialize(void);
|
||||
#endif
|
||||
|
||||
#endif /* __INCLUDE_NUTTX_SEGGER_SYSVIEW_H */
|
||||
|
|
Loading…
Reference in a new issue