diff options
| author | armink <[email protected]> | 2014-09-13 11:22:01 +0800 |
|---|---|---|
| committer | armink <[email protected]> | 2014-09-13 11:22:01 +0800 |
| commit | 7121697a71953bf0c7efd4141fc29e29307b3913 (patch) | |
| tree | f3c7c8c7dc5326cc342add80233ea4f80f497b34 /components | |
| parent | ed57c7c32a3642c4512c71a0779bbb6e9780f3ad (diff) | |
[Ymodem]Add device open flag as input parameter to ymodem function.
Diffstat (limited to 'components')
| -rw-r--r-- | components/utilities/ymodem/ymodem.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/components/utilities/ymodem/ymodem.c b/components/utilities/ymodem/ymodem.c index 3af1528024..7e8ad12419 100644 --- a/components/utilities/ymodem/ymodem.c +++ b/components/utilities/ymodem/ymodem.c @@ -311,6 +311,7 @@ static rt_err_t _rym_do_recv( rt_err_t rym_recv_on_device( struct rym_ctx *ctx, rt_device_t dev, + rt_uint16_t oflag, rym_callback on_begin, rym_callback on_data, rym_callback on_end, @@ -341,7 +342,7 @@ rt_err_t rym_recv_on_device( dev->flag &= ~RT_DEVICE_FLAG_STREAM; rt_hw_interrupt_enable(int_lvl); - res = rt_device_open(dev, 0); + res = rt_device_open(dev, oflag); if (res != RT_EOK) goto __exit; @@ -364,4 +365,3 @@ __exit: return res; } - |
