提交 6d2df9bf 编写于 作者: G Grissiom

finsh: unregister rx_indicate when closing the device

Because the device could still remain opened when closed by finsh, the
old rx_indicate is useless for finsh. Some buggy driver will still
generate rx_indicate even after the device has been closed. So FinSh
should unregister the rx_indicate when releasing the old device.
上级 7bdb082c
......@@ -131,6 +131,7 @@ void finsh_set_device(const char* device_name)
{
/* close old finsh device */
rt_device_close(shell->device);
rt_device_set_rx_indicate(dev, RT_NULL);
}
shell->device = dev;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册