1.修复mr_printf错误。

This commit is contained in:
MacRsh
2023-12-08 21:33:18 +08:00
parent c6d89df2d2
commit 15e29ee7aa
3 changed files with 6 additions and 6 deletions

View File

@@ -56,10 +56,10 @@ menu "Device configure"
"Enable or disable non-blocking read/write for the console device."
endmenu
config MR_USING_PRINTF_BUFSZ
config MR_CFG_PRINTF_BUFSZ
int "Size of printf buffer"
default 128
range 16 2147483647
range 32 2147483647
help
"This option sets the size of the buffer used for printf operations."

View File

@@ -167,7 +167,7 @@ int timer_init(void)
/* 打印TIMER描述符 */
mr_printf("TIMER desc: %d\r\n", timer_ds);
/* 设置超时回调函数 */
mr_dev_ioctl(led_ds, MR_CTL_TIMER_SET_TIMEOUT_CALL, timeout_call);
mr_dev_ioctl(timer_ds, MR_CTL_TIMER_SET_TIMEOUT_CALL, timeout_call);
/* 设置定时时间 */
uint32_t timeout = TIMEOUT;
int ret = mr_dev_write(timer_ds, &timeout, sizeof(timeout));

View File

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