This is an automated email from the ASF dual-hosted git repository.

pkarashchenko pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git

commit 61dff1c12525faffeef6c40c759c75d7b0a04295
Author: Xiang Xiao <[email protected]>
AuthorDate: Thu Jul 14 19:29:31 2022 +0800

    arch/arm64: Implement up_nputs
    
    Signed-off-by: Xiang Xiao <[email protected]>
---
 arch/arm64/src/common/Make.defs     |  2 +-
 arch/arm64/src/common/arm64_nputs.c | 46 +++++++++++++++++++++++++++++++++++++
 2 files changed, 47 insertions(+), 1 deletion(-)

diff --git a/arch/arm64/src/common/Make.defs b/arch/arm64/src/common/Make.defs
index f9633c3bdb..4e4b1a3a76 100644
--- a/arch/arm64/src/common/Make.defs
+++ b/arch/arm64/src/common/Make.defs
@@ -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
diff --git a/arch/arm64/src/common/arm64_nputs.c 
b/arch/arm64/src/common/arm64_nputs.c
new file mode 100644
index 0000000000..41277451bf
--- /dev/null
+++ b/arch/arm64/src/common/arm64_nputs.c
@@ -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++);
+    }
+}

Reply via email to