drivers/segger: register sysview to note drivers list

Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
This commit is contained in:
yinshengkai
2023-01-05 18:15:06 +08:00
committed by Xiang Xiao
parent 4ba7624804
commit 77466742c7
4 changed files with 144 additions and 381 deletions
+2 -4
View File
@@ -19,11 +19,9 @@
############################################################################
ifeq ($(CONFIG_DRIVER_NOTE),y)
ifeq ($(CONFIG_SEGGER_SYSVIEW),)
CSRCS += note_driver.c
CFLAGS += ${INCDIR_PREFIX}${TOPDIR}/sched
endif
CSRCS += note_driver.c
CSRCS += note_initialize.c
CFLAGS += ${INCDIR_PREFIX}${TOPDIR}/sched
endif
ifeq ($(CONFIG_DRIVER_NOTERAM),y)
+21
View File
@@ -1907,3 +1907,24 @@ int note_get_taskname(pid_t pid, FAR char *buffer)
}
#endif
/****************************************************************************
* Name: note_driver_register
****************************************************************************/
int note_driver_register(FAR struct note_driver_s *driver)
{
int i;
DEBUGASSERT(driver);
for (i = 0; i < CONFIG_DRIVER_NOTE_MAX; i++)
{
if (g_note_drivers[i] == NULL)
{
g_note_drivers[i] = driver;
return OK;
}
}
return -ENOMEM;
}
+115 -377
View File
File diff suppressed because it is too large Load Diff
+6
View File
@@ -154,4 +154,10 @@ int note_get_taskname(pid_t pid, FAR char *name);
#endif /* CONFIG_DRIVER_NOTE_TASKNAME_BUFSIZE > 0 */
/****************************************************************************
* Name: note_driver_register
****************************************************************************/
int note_driver_register(FAR struct note_driver_s *driver);
#endif /* __INCLUDE_NUTTX_NOTE_NOTE_DRIVER_H */