Merge pull request #860 from liu2guang/master

[Example/Test] 修复无法重复使用finsh命令device_test进行驱动测试
This commit is contained in:
Bernard Xiong 2017-10-03 10:59:58 +08:00 committed by GitHub
commit a15d90a686

View File

@ -449,11 +449,13 @@ static rt_err_t _block_device_test(rt_device_t device)
}
} /* step 5: multiple sector speed test */
rt_device_close(device);
return RT_EOK;
}// device can read and write.
else
{
// device read only
rt_device_close(device);
return RT_EOK;
}// device read only
@ -466,6 +468,7 @@ __return:
{
rt_free(write_buffer);
}
rt_device_close(device);
return RT_ERROR;
}