From f33c89ce5aed94bf143f7f4d0bd7e1e743176f06 Mon Sep 17 00:00:00 2001 From: liuduanfei <939763442@qq.com> Date: Wed, 14 Jul 2021 07:02:56 +0000 Subject: 64位模式下 默认支持 RT_PRINTF_LONGLONG MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/kservice.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src') diff --git a/src/kservice.c b/src/kservice.c index e9972dba97..dfb37dd888 100644 --- a/src/kservice.c +++ b/src/kservice.c @@ -30,6 +30,10 @@ /* use precision */ #define RT_PRINTF_PRECISION +#ifdef ARCH_CPU_64BIT + #define RT_PRINTF_LONGLONG +#endif + /** * @addtogroup KernelService */ -- cgit v1.3.1 From 1d276ac4b32f53899a60aff8d0406143177fe17e Mon Sep 17 00:00:00 2001 From: liuduanfei <939763442@qq.com> Date: Thu, 15 Jul 2021 08:28:30 +0000 Subject: 清除 kservice.c 中对 RT_PRINTF_LONGLONG 的支持 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/kservice.c | 4 ---- 1 file changed, 4 deletions(-) (limited to 'src') diff --git a/src/kservice.c b/src/kservice.c index dfb37dd888..e9972dba97 100644 --- a/src/kservice.c +++ b/src/kservice.c @@ -30,10 +30,6 @@ /* use precision */ #define RT_PRINTF_PRECISION -#ifdef ARCH_CPU_64BIT - #define RT_PRINTF_LONGLONG -#endif - /** * @addtogroup KernelService */ -- cgit v1.3.1 From 4e40129e57f8c507514fc981fa742820a1a08e8a Mon Sep 17 00:00:00 2001 From: liuduanfei <939763442@qq.com> Date: Thu, 15 Jul 2021 08:30:17 +0000 Subject: Kconfig 中添加 RT_PRINTF_LONGLONG 的选择,默认不选择 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Kconfig | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src') diff --git a/src/Kconfig b/src/Kconfig index 6afb719395..a1b0ff9a17 100644 --- a/src/Kconfig +++ b/src/Kconfig @@ -347,6 +347,10 @@ menu "Kernel Device Object" config RT_CONSOLE_DEVICE_NAME string "the device name for console" default "uart" + + config RT_PRINTF_LONGLONG + bool "rt_kprintf support long long" + default n endif endmenu -- cgit v1.3.1