Move note driver from drivers/syslog to drivers/note

it's better to put the note transport layer into a common folder

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
Xiang Xiao 2020-08-06 01:43:13 +08:00 committed by liuguo09
parent dc4c4102c3
commit f99719e260
21 changed files with 63 additions and 34 deletions

View File

@ -33,7 +33,7 @@
#include <nuttx/net/loopback.h>
#include <nuttx/net/tun.h>
#include <nuttx/net/telnet.h>
#include <nuttx/syslog/note_driver.h>
#include <nuttx/note/note_driver.h>
#include <nuttx/syslog/syslog_console.h>
#include <nuttx/serial/pty.h>
#include <nuttx/crypto/crypto.h>

View File

@ -48,7 +48,7 @@
#include <nuttx/net/loopback.h>
#include <nuttx/net/tun.h>
#include <nuttx/net/telnet.h>
#include <nuttx/syslog/note_driver.h>
#include <nuttx/note/note_driver.h>
#include <nuttx/syslog/syslog_console.h>
#include <nuttx/serial/pty.h>
#include <nuttx/crypto/crypto.h>

View File

@ -49,7 +49,7 @@
#include <nuttx/net/loopback.h>
#include <nuttx/net/tun.h>
#include <nuttx/net/telnet.h>
#include <nuttx/syslog/note_driver.h>
#include <nuttx/note/note_driver.h>
#include <nuttx/syslog/syslog_console.h>
#include <nuttx/serial/pty.h>
#include <nuttx/crypto/crypto.h>

View File

@ -48,7 +48,7 @@
#include <nuttx/net/loopback.h>
#include <nuttx/net/tun.h>
#include <nuttx/net/telnet.h>
#include <nuttx/syslog/note_driver.h>
#include <nuttx/note/note_driver.h>
#include <nuttx/syslog/syslog_console.h>
#include <nuttx/serial/pty.h>
#include <nuttx/crypto/crypto.h>

View File

@ -48,7 +48,7 @@
#include <nuttx/net/loopback.h>
#include <nuttx/net/tun.h>
#include <nuttx/net/telnet.h>
#include <nuttx/syslog/note_driver.h>
#include <nuttx/note/note_driver.h>
#include <nuttx/syslog/syslog_console.h>
#include <nuttx/serial/pty.h>
#include <nuttx/crypto/crypto.h>

View File

@ -49,7 +49,7 @@
#include <nuttx/net/loopback.h>
#include <nuttx/net/tun.h>
#include <nuttx/net/telnet.h>
#include <nuttx/syslog/note_driver.h>
#include <nuttx/note/note_driver.h>
#include <nuttx/syslog/syslog_console.h>
#include <nuttx/serial/pty.h>
#include <nuttx/crypto/crypto.h>

View File

@ -45,7 +45,7 @@
#include <nuttx/arch.h>
#include <nuttx/board.h>
#include <nuttx/serial/pty.h>
#include <nuttx/syslog/note_driver.h>
#include <nuttx/note/note_driver.h>
#include <nuttx/syslog/syslog_console.h>
#include <nuttx/drivers/drivers.h>

View File

@ -49,7 +49,7 @@
#include <nuttx/net/tun.h>
#include <nuttx/net/telnet.h>
#include <nuttx/mtd/mtd.h>
#include <nuttx/syslog/note_driver.h>
#include <nuttx/note/note_driver.h>
#include <nuttx/syslog/syslog_console.h>
#include <nuttx/serial/pty.h>
#include <nuttx/crypto/crypto.h>

View File

@ -48,7 +48,7 @@
#include <nuttx/net/loopback.h>
#include <nuttx/net/tun.h>
#include <nuttx/net/telnet.h>
#include <nuttx/syslog/note_driver.h>
#include <nuttx/note/note_driver.h>
#include <nuttx/syslog/syslog_console.h>
#include <nuttx/serial/pty.h>
#include <nuttx/crypto/crypto.h>

View File

@ -35,7 +35,7 @@
#include <nuttx/net/tun.h>
#include <nuttx/net/telnet.h>
#include <nuttx/syslog/syslog.h>
#include <nuttx/syslog/note_driver.h>
#include <nuttx/note/note_driver.h>
#include <nuttx/syslog/syslog_console.h>
#include <nuttx/serial/pty.h>
#include <nuttx/crypto/crypto.h>

View File

@ -48,7 +48,7 @@
#include <nuttx/net/loopback.h>
#include <nuttx/net/tun.h>
#include <nuttx/net/telnet.h>
#include <nuttx/syslog/note_driver.h>
#include <nuttx/note/note_driver.h>
#include <nuttx/syslog/syslog_console.h>
#include <nuttx/serial/pty.h>
#include <nuttx/crypto/crypto.h>

View File

@ -33,7 +33,7 @@
#include <nuttx/net/loopback.h>
#include <nuttx/net/tun.h>
#include <nuttx/net/telnet.h>
#include <nuttx/syslog/note_driver.h>
#include <nuttx/note/note_driver.h>
#include <nuttx/syslog/syslog_console.h>
#include <nuttx/serial/pty.h>
#include <nuttx/crypto/crypto.h>

View File

@ -34,7 +34,7 @@
#include <nuttx/net/loopback.h>
#include <nuttx/net/telnet.h>
#include <nuttx/net/tun.h>
#include <nuttx/syslog/note_driver.h>
#include <nuttx/note/note_driver.h>
#include <nuttx/syslog/syslog_console.h>
#include <nuttx/serial/pty.h>
#include <nuttx/crypto/crypto.h>

View File

@ -96,6 +96,7 @@ source drivers/modem/Kconfig
source drivers/mtd/Kconfig
source drivers/eeprom/Kconfig
source drivers/net/Kconfig
source drivers/note/Kconfig
source drivers/pipes/Kconfig
source drivers/power/Kconfig
source drivers/rptun/Kconfig

View File

@ -56,6 +56,7 @@ include modem/Make.defs
include mtd/Make.defs
include eeprom/Make.defs
include net/Make.defs
include note/Make.defs
include pipes/Make.defs
include power/Make.defs
include rptun/Make.defs

17
drivers/note/Kconfig Normal file
View File

@ -0,0 +1,17 @@
#
# For a description of the syntax of this configuration file,
# see the file kconfig-language.txt in the NuttX tools repository.
#
menu "Note Driver Support"
config DRIVER_NOTE
bool "Scheduler instrumentation driver"
default n
depends on SCHED_INSTRUMENTATION_BUFFER && SCHED_NOTE_GET
---help---
Enable building a serial driver that can be used by an application
to read data from the in-memory, scheduler instrumentation "note"
buffer.
endmenu

26
drivers/note/Make.defs Normal file
View File

@ -0,0 +1,26 @@
############################################################################
# drivers/note/Make.defs
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership. The
# ASF licenses this file to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance with the
# License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
#
############################################################################
ifeq ($(CONFIG_DRIVER_NOTE),y)
CSRCS += note_driver.c
endif
DEPPATH += --dep-path note
VPATH += :note

View File

@ -1,5 +1,5 @@
/****************************************************************************
* drivers/syslog/note_driver.c
* drivers/note/note_driver.c
*
* Copyright (C) 2016 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>

View File

@ -68,15 +68,6 @@ config RAMLOG_OVERWRITE
endif
config DRIVER_NOTE
bool "Scheduler instrumentation driver"
default n
depends on SCHED_INSTRUMENTATION_BUFFER && SCHED_NOTE_GET
---help---
Enable building a serial driver that can be used by an application
to read data from the in-memory, scheduler instrumentation "note"
buffer.
config SYSLOG_BUFFER
bool "Use buffered output"
default n

View File

@ -48,13 +48,6 @@ ifneq ($(CONFIG_ARCH_SYSLOG),y)
CSRCS += syslog_initialize.c
endif
# The note driver is hosted in this directory, but is not associated with
# SYSLOGging
ifeq ($(CONFIG_DRIVER_NOTE),y)
CSRCS += note_driver.c
endif
# The RAMLOG device is usable as a system logging device or standalone
ifeq ($(CONFIG_RAMLOG),y)

View File

@ -1,5 +1,5 @@
/****************************************************************************
* include/nuttx/syslog/note_driver.h
* include/nuttx/note/note_driver.h
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
@ -18,8 +18,8 @@
*
****************************************************************************/
#ifndef __INCLUDE_NUTTX_SYSLOG_NOTE_DRIVER_H
#define __INCLUDE_NUTTX_SYSLOG_NOTE_DRIVER_H
#ifndef __INCLUDE_NUTTX_NOTE_NOTE_DRIVER_H
#define __INCLUDE_NUTTX_NOTE_NOTE_DRIVER_H
/****************************************************************************
* Included Files
@ -66,4 +66,4 @@ int note_register(void);
#endif /* CONFIG_SCHED_INSTRUMENTATION */
#endif /* __INCLUDE_NUTTX_SYSLOG_NOTE_DRIVER_H */
#endif /* __INCLUDE_NUTTX_NOTE_NOTE_DRIVER_H */