1.新增Printf缓冲区配置。
This commit is contained in:
5
Kconfig
5
Kconfig
@@ -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
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user