Merge pull request #4480 from iysheng/serial

[components][serial] fix do RT_DEVICE_CTRL_CLOSE cmd when close seria…
This commit is contained in:
Bernard Xiong 2021-03-31 17:51:58 +08:00 committed by GitHub
commit 50700c8d9b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -816,11 +816,11 @@ static rt_err_t rt_serial_close(struct rt_device *dev)
/* configure low level device */
serial->ops->control(serial, RT_DEVICE_CTRL_CLR_INT, (void *) RT_DEVICE_FLAG_DMA_TX);
}
#endif /* RT_SERIAL_USING_DMA */
serial->ops->control(serial, RT_DEVICE_CTRL_CLOSE, RT_NULL);
dev->flag &= ~RT_DEVICE_FLAG_ACTIVATED;
#endif /* RT_SERIAL_USING_DMA */
return RT_EOK;
}