blob: 302065c4b881aedfd74ba337a4f0fca64509fea9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
/*
* Copyright (c) 2006-2021, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
* Change Logs:
* Date Author Notes
*/
#include <ymodem.h>
static enum rym_code _rym_dummy_write(
struct rym_ctx *ctx,
rt_uint8_t *buf,
rt_size_t len)
{
return RYM_CODE_ACK;
}
#ifdef RT_USING_FINSH
rt_err_t rym_null(char *devname)
{
struct rym_ctx rctx;
rt_device_t dev = rt_device_find(devname);
if (!dev)
{
rt_kprintf("could not find device %s\n", devname);
return -1;
}
return rym_recv_on_device(&rctx, dev, RT_DEVICE_OFLAG_RDWR | RT_DEVICE_FLAG_INT_RX,
RT_NULL, _rym_dummy_write, RT_NULL, 1000);
}
#endif
|