You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by ac...@apache.org on 2021/07/04 21:52:41 UTC
[incubator-nuttx] 01/03: note: Move up_schednote.c to drivers/note
folder
This is an automated email from the ASF dual-hosted git repository.
acassis pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git
commit 0941bad877d1e4a5513eb067c51ca675b628c229
Author: Xiang Xiao <xi...@xiaomi.com>
AuthorDate: Tue Oct 13 20:19:28 2020 +0800
note: Move up_schednote.c to drivers/note folder
since it is general enough to work on other target
Signed-off-by: Xiang Xiao <xi...@xiaomi.com>
---
arch/sim/src/Makefile | 6 ------
drivers/note/Kconfig | 6 ++++++
drivers/note/Make.defs | 4 ++++
arch/sim/src/sim/up_schednote.c => drivers/note/notelog_driver.c | 2 +-
4 files changed, 11 insertions(+), 7 deletions(-)
diff --git a/arch/sim/src/Makefile b/arch/sim/src/Makefile
index bd669e8..29b5380 100644
--- a/arch/sim/src/Makefile
+++ b/arch/sim/src/Makefile
@@ -104,12 +104,6 @@ endif
HOSTSRCS += up_simsmp.c
endif
-ifeq ($(CONFIG_SCHED_INSTRUMENTATION),y)
-ifneq ($(CONFIG_SCHED_INSTRUMENTATION_BUFFER),y)
- CSRCS += up_schednote.c
-endif
-endif
-
ifeq ($(CONFIG_ONESHOT),y)
CSRCS += up_oneshot.c
endif
diff --git a/drivers/note/Kconfig b/drivers/note/Kconfig
index 61a2274..0644402 100644
--- a/drivers/note/Kconfig
+++ b/drivers/note/Kconfig
@@ -46,6 +46,12 @@ config DRIVER_NOTEARCH
---help---
The note driver is provided by arch specific code.
+config DRIVER_NOTELOG
+ bool "Note syslog driver"
+ select SCHED_INSTRUMENTATION_EXTERNAL
+ ---help---
+ The note driver output to syslog.
+
endchoice
config DRIVER_NOTERAM_BUFSIZE
diff --git a/drivers/note/Make.defs b/drivers/note/Make.defs
index 943e4ff..fc74611 100644
--- a/drivers/note/Make.defs
+++ b/drivers/note/Make.defs
@@ -26,6 +26,10 @@ ifeq ($(CONFIG_DRIVER_NOTERAM),y)
CSRCS += noteram_driver.c
endif
+ifeq ($(CONFIG_DRIVER_NOTELOG),y)
+ CSRCS += notelog_driver.c
+endif
+
ifeq ($(CONFIG_DRIVER_NOTECTL),y)
CSRCS += notectl_driver.c
endif
diff --git a/arch/sim/src/sim/up_schednote.c b/drivers/note/notelog_driver.c
similarity index 99%
rename from arch/sim/src/sim/up_schednote.c
rename to drivers/note/notelog_driver.c
index e06976b..4b855e3 100644
--- a/arch/sim/src/sim/up_schednote.c
+++ b/drivers/note/notelog_driver.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * arch/sim/src/sim/up_schednote.c
+ * drivers/note/notelog_driver.c
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with