[serial_v2] fixed bug (#6213)

* [kernel][timer] fixed bug serial_v2 驱动问题,导致所有写入都使用阻塞方式写入
This commit is contained in:
HubretXie 2022-08-04 10:42:20 +08:00 committed by GitHub
parent 78d8496db0
commit 223bc17df9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1389,7 +1389,7 @@ static rt_size_t rt_serial_write(struct rt_device *dev,
return _serial_poll_tx(dev, pos, buffer, size);
}
if (dev->open_flag | RT_SERIAL_TX_BLOCKING)
if (dev->open_flag & RT_SERIAL_TX_BLOCKING)
{
if ((tx_fifo->rb.buffer_ptr) == RT_NULL)
{