diff options
| author | yygg_you <[email protected]> | 2017-10-06 08:58:24 +0800 |
|---|---|---|
| committer | yygg_you <[email protected]> | 2017-10-06 08:58:24 +0800 |
| commit | 2e01bafa71dc0309abfca352edae8872d27038fc (patch) | |
| tree | a4208429d31866a5938ee6484ae25b525d0180d7 /examples/test | |
| parent | ad1d3375f222c5746514ab16003dc18c0df83dad (diff) | |
| parent | a15d90a6865fa05e2420205556df7cece5f5c134 (diff) | |
Merge branch 'master' of https://github.com/yygg/rt-thread
Diffstat (limited to 'examples/test')
| -rw-r--r-- | examples/test/device_test.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/examples/test/device_test.c b/examples/test/device_test.c index 337eb0dbd0..c1902fe919 100644 --- a/examples/test/device_test.c +++ b/examples/test/device_test.c @@ -90,7 +90,7 @@ static rt_err_t _block_device_test(rt_device_t device) /* step 3: R/W test */ { - rt_uint32_t i,err_count, sector_no; + rt_uint32_t i, err_count, sector_no; rt_uint8_t * data_point; i = rt_device_read(device, 0, read_buffer, 1); @@ -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; } |
