mirror of
https://github.com/apache/nuttx.git
synced 2026-05-27 11:26:12 +08:00
drivers/segger: register sysview to note drivers list
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
This commit is contained in:
@@ -19,11 +19,9 @@
|
|||||||
############################################################################
|
############################################################################
|
||||||
|
|
||||||
ifeq ($(CONFIG_DRIVER_NOTE),y)
|
ifeq ($(CONFIG_DRIVER_NOTE),y)
|
||||||
ifeq ($(CONFIG_SEGGER_SYSVIEW),)
|
CSRCS += note_driver.c
|
||||||
CSRCS += note_driver.c
|
|
||||||
CFLAGS += ${INCDIR_PREFIX}${TOPDIR}/sched
|
|
||||||
endif
|
|
||||||
CSRCS += note_initialize.c
|
CSRCS += note_initialize.c
|
||||||
|
CFLAGS += ${INCDIR_PREFIX}${TOPDIR}/sched
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(CONFIG_DRIVER_NOTERAM),y)
|
ifeq ($(CONFIG_DRIVER_NOTERAM),y)
|
||||||
|
|||||||
@@ -1907,3 +1907,24 @@ int note_get_taskname(pid_t pid, FAR char *buffer)
|
|||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#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
File diff suppressed because it is too large
Load Diff
@@ -154,4 +154,10 @@ int note_get_taskname(pid_t pid, FAR char *name);
|
|||||||
|
|
||||||
#endif /* CONFIG_DRIVER_NOTE_TASKNAME_BUFSIZE > 0 */
|
#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 */
|
#endif /* __INCLUDE_NUTTX_NOTE_NOTE_DRIVER_H */
|
||||||
|
|||||||
Reference in New Issue
Block a user