Lines Matching refs:res
41 int res, err; in ymodem_read_fit() local
46 res = xyzModem_stream_read(buf, BUF_SIZE, &err); in ymodem_read_fit()
47 if (res <= 0) in ymodem_read_fit()
48 return res; in ymodem_read_fit()
49 info->image_read += res; in ymodem_read_fit()
53 res = info->image_read - offset; in ymodem_read_fit()
54 memcpy(addr, &buf[BUF_SIZE - res], res); in ymodem_read_fit()
55 addr = addr + res; in ymodem_read_fit()
59 res = xyzModem_stream_read(buf, BUF_SIZE, &err); in ymodem_read_fit()
60 if (res <= 0) in ymodem_read_fit()
61 return res; in ymodem_read_fit()
63 memcpy(addr, buf, res); in ymodem_read_fit()
64 info->image_read += res; in ymodem_read_fit()
65 addr += res; in ymodem_read_fit()
76 int res; in spl_ymodem_load_image() local
89 res = xyzModem_stream_read(buf, BUF_SIZE, &err); in spl_ymodem_load_image()
90 if (res <= 0) in spl_ymodem_load_image()
109 while ((res = xyzModem_stream_read(buf, BUF_SIZE, &err)) > 0) in spl_ymodem_load_image()
110 size += res; in spl_ymodem_load_image()
117 memcpy((void *)addr, buf, res); in spl_ymodem_load_image()
118 size += res; in spl_ymodem_load_image()
119 addr += res; in spl_ymodem_load_image()
121 while ((res = xyzModem_stream_read(buf, BUF_SIZE, &err)) > 0) { in spl_ymodem_load_image()
122 memcpy((void *)addr, buf, res); in spl_ymodem_load_image()
123 size += res; in spl_ymodem_load_image()
124 addr += res; in spl_ymodem_load_image()