Merge pull request #3352 from z14git/serial_bug_fix

修复因串口接收缓冲区满且没有开启ULOG_USING_ISR_LOG而造成的死机问题
This commit is contained in:
Bernard Xiong 2020-02-11 11:56:01 +08:00 committed by GitHub
commit dd5178efdf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 3 deletions

View File

@ -333,8 +333,10 @@ static void _serial_check_buffer_size(void)
if (already_output == RT_FALSE)
{
#if !defined(RT_USING_ULOG) || defined(ULOG_USING_ISR_LOG)
LOG_W("Warning: There is no enough buffer for saving data,"
" please increase the RT_SERIAL_RB_BUFSZ option.");
#endif
already_output = RT_TRUE;
}
}
@ -1286,4 +1288,3 @@ void rt_hw_serial_isr(struct rt_serial_device *serial, int event)
#endif /* RT_SERIAL_USING_DMA */
}
}