mirror of
https://github.com/apache/nuttx.git
synced 2026-05-21 21:34:07 +08:00
drivers/segger: move g_segger_lock to segger.c
Signed-off-by: liwenxiang1 <liwenxiang1@xiaomi.com>
This commit is contained in:
@@ -48,6 +48,8 @@ endif()
|
||||
if(CONFIG_SEGGER_RTT)
|
||||
nuttx_add_kernel_library(RTT)
|
||||
|
||||
target_sources(RTT PRIVATE segger.c)
|
||||
|
||||
set(RTT_SRCS SystemView/SEGGER/SEGGER_RTT.c)
|
||||
|
||||
if(CONFIG_SEGGER_RTT_SECTION)
|
||||
|
||||
@@ -24,6 +24,7 @@ TARGET_ZIP =
|
||||
SGDIR = segger
|
||||
|
||||
ifeq ($(CONFIG_SEGGER_RTT),y)
|
||||
CSRCS += segger/segger.c
|
||||
CSRCS += segger/SystemView/SEGGER/SEGGER_RTT.c
|
||||
|
||||
CFLAGS += -Wno-shadow -Wno-pointer-to-int-cast
|
||||
|
||||
@@ -158,12 +158,6 @@ static struct note_sysview_driver_s g_note_sysview_driver =
|
||||
}
|
||||
};
|
||||
|
||||
/****************************************************************************
|
||||
* Public Data
|
||||
****************************************************************************/
|
||||
|
||||
spinlock_t g_segger_lock = SP_UNLOCKED;
|
||||
|
||||
/****************************************************************************
|
||||
* Private Functions
|
||||
****************************************************************************/
|
||||
|
||||
@@ -0,0 +1,37 @@
|
||||
/****************************************************************************
|
||||
* drivers/segger/segger.c
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Included Files
|
||||
****************************************************************************/
|
||||
|
||||
#include <nuttx/sched.h>
|
||||
|
||||
/****************************************************************************
|
||||
* Public Data
|
||||
****************************************************************************/
|
||||
|
||||
spinlock_t g_segger_lock = SP_UNLOCKED;
|
||||
|
||||
/****************************************************************************
|
||||
* Public Functions
|
||||
****************************************************************************/
|
||||
Reference in New Issue
Block a user