arch/sim: Move up_nputs to sim_uart.c

and remove arch/sim/src/sim/sim_nputs.c

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
Xiang Xiao 2022-12-17 17:09:07 +08:00 committed by Petro Karashchenko
parent 86c692f7a7
commit b6f1be8e03
3 changed files with 18 additions and 62 deletions

View File

@ -59,10 +59,8 @@ AOBJS = $(ASRCS:.S=$(OBJEXT))
CSRCS = sim_initialize.c sim_idle.c sim_interruptcontext.c sim_initialstate.c CSRCS = sim_initialize.c sim_idle.c sim_interruptcontext.c sim_initialstate.c
CSRCS += sim_createstack.c sim_usestack.c sim_releasestack.c sim_stackframe.c CSRCS += sim_createstack.c sim_usestack.c sim_releasestack.c sim_stackframe.c
CSRCS += sim_exit.c sim_schedulesigaction.c sim_switchcontext.c CSRCS += sim_exit.c sim_schedulesigaction.c sim_switchcontext.c sim_heap.c
CSRCS += sim_heap.c sim_uart.c sim_assert.c sim_nputs.c CSRCS += sim_uart.c sim_assert.c sim_copyfullstate.c sim_sigdeliver.c
CSRCS += sim_copyfullstate.c
CSRCS += sim_sigdeliver.c
ifeq ($(CONFIG_SCHED_BACKTRACE),y) ifeq ($(CONFIG_SCHED_BACKTRACE),y)
CSRCS += sim_backtrace.c CSRCS += sim_backtrace.c

View File

@ -1,58 +0,0 @@
/****************************************************************************
* arch/sim/src/sim/sim_nputs.c
*
* 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/config.h>
#include <nuttx/arch.h>
/****************************************************************************
* Pre-processor Definitions
****************************************************************************/
/****************************************************************************
* Private Data
****************************************************************************/
/****************************************************************************
* Private Functions
****************************************************************************/
/****************************************************************************
* Public Functions
****************************************************************************/
/****************************************************************************
* Name: up_nputs
*
* Description:
* This is a low-level helper function used to support debug.
*
****************************************************************************/
void up_nputs(const char *str, size_t len)
{
while (len-- > 0 && *str)
{
up_putc(*str++);
}
}

View File

@ -569,3 +569,19 @@ int up_putc(int ch)
#endif #endif
return 0; return 0;
} }
/****************************************************************************
* Name: up_nputs
*
* Description:
* This is a low-level helper function used to support debug.
*
****************************************************************************/
void up_nputs(const char *str, size_t len)
{
while (len-- > 0 && *str)
{
up_putc(*str++);
}
}