diff options
| author | Bernard Xiong <[email protected]> | 2021-03-31 17:51:58 +0800 |
|---|---|---|
| committer | GitHub <[email protected]> | 2021-03-31 17:51:58 +0800 |
| commit | 50700c8d9b1debca4e878313231695bd6a1bfc11 (patch) | |
| tree | 2d52569a3dc38a818a756ade707d8530aef37400 /components | |
| parent | a225ca8014aae63f2d6ef46811fe8d689981e54a (diff) | |
| parent | fcffea45018e81e5bfdb16dfb77a60a66405df00 (diff) | |
Merge pull request #4480 from iysheng/serial
[components][serial] fix do RT_DEVICE_CTRL_CLOSE cmd when close seria…
Diffstat (limited to 'components')
| -rw-r--r-- | components/drivers/serial/serial.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/components/drivers/serial/serial.c b/components/drivers/serial/serial.c index d9a20f05a0..32161ad0cb 100644 --- a/components/drivers/serial/serial.c +++ b/components/drivers/serial/serial.c @@ -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; } |
