!10 优化串口开销

Merge pull request !10 from AiYangSky/Serial-port-optimization
This commit is contained in:
jario-jin 2023-07-20 09:47:25 +00:00 committed by Gitee
commit 05bba1d2f2
1 changed files with 1 additions and 2 deletions

View File

@ -39,9 +39,8 @@ public:
virtual bool inPutByte(IN uint8_t *byte)
{
if (ser->available() > 0)
if (ser->read(byte, 1))
{
ser->read(byte, 1);
return true;
}
return false;