1.新增Printf缓冲区配置。

This commit is contained in:
MacRsh
2023-12-03 19:35:46 +08:00
parent 8e33f734ac
commit 503b0cf702
2 changed files with 9 additions and 1 deletions

View File

@@ -31,6 +31,11 @@ menu "Device configure"
bool "Enable read/write control"
default y
config MR_USING_PRINTF_BUFSZ
bool "The size of printf buffer"
default 128
range 16 2147483647
config MR_USING_ADC
bool "Enable ADC device"
default n

View File

@@ -311,7 +311,10 @@ MR_WEAK int mr_printf_output(const char *buf, size_t size)
*/
int mr_printf(const char *fmt, ...)
{
char buf[128] = {0};
#ifndef MR_USING_PRINTF_BUFSZ
#define MR_USING_PRINTF_BUFSZ (128)
#endif /* MR_USING_PRINTF_BUFSZ */
char buf[MR_USING_PRINTF_BUFSZ] = {0};
va_list args;
va_start(args, fmt);