arch/arm64: Implement up_nputs

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
Xiang Xiao 2022-07-14 19:29:31 +08:00 committed by Petro Karashchenko
parent aad5fbd2fb
commit 61dff1c125
2 changed files with 47 additions and 1 deletions

View File

@ -43,7 +43,7 @@ endif
# Common C source files ( OS call up_xxx)
CMN_CSRCS = arm64_initialize.c arm64_initialstate.c arm64_boot.c
CMN_CSRCS += arm64_idle.c arm64_copystate.c
CMN_CSRCS += arm64_nputs.c arm64_idle.c arm64_copystate.c
CMN_CSRCS += arm64_createstack.c arm64_releasestack.c arm64_stackframe.c arm64_usestack.c
CMN_CSRCS += arm64_task_sched.c arm64_exit.c arm64_vfork.c arm64_reprioritizertr.c
CMN_CSRCS += arm64_releasepending.c arm64_unblocktask.c arm64_blocktask.c

View File

@ -0,0 +1,46 @@
/****************************************************************************
* arch/arm64/src/common/arm64_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>
/****************************************************************************
* 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 (*str && len-- > 0)
{
up_putc(*str++);
}
}