Newer
Older
res);
}
}
} else {
printf ("%s\n", xyzModem_error (err));
xyzModem_stream_close (&err);
xyzModem_stream_terminate (false, &getcxmodem);
flush_cache (offset, size);
printf ("## Total Size = 0x%08x = %d Bytes\n", size, size);
sprintf (buf, "%X", size);
setenv ("filesize", buf);
return offset;
}
/* -------------------------------------------------------------------- */
#if defined(CONFIG_CMD_LOADS)
#ifdef CONFIG_SYS_LOADS_BAUD_CHANGE
U_BOOT_CMD(
loads, 3, 0, do_load_serial,
"[ off ] [ baud ]\n"
" - load S-Record file over serial line"
#else /* ! CONFIG_SYS_LOADS_BAUD_CHANGE */
U_BOOT_CMD(
loads, 2, 0, do_load_serial,
" - load S-Record file over serial line with offset 'off'"
#endif /* CONFIG_SYS_LOADS_BAUD_CHANGE */
/*
* SAVES always requires LOADS support, but not vice versa
*/
#if defined(CONFIG_CMD_SAVES)
#ifdef CONFIG_SYS_LOADS_BAUD_CHANGE
U_BOOT_CMD(
saves, 4, 0, do_save_serial,
"[ off ] [size] [ baud ]\n"
" - save S-Record file over serial line"
" with offset 'off', size 'size' and baudrate 'baud'"
#else /* ! CONFIG_SYS_LOADS_BAUD_CHANGE */
U_BOOT_CMD(
saves, 3, 0, do_save_serial,
" - save S-Record file over serial line with offset 'off' and size 'size'"
#endif /* CONFIG_SYS_LOADS_BAUD_CHANGE */
#endif
#endif
#if defined(CONFIG_CMD_LOADB)
U_BOOT_CMD(
loadb, 3, 0, do_load_serial_bin,
"[ off ] [ baud ]\n"
" - load binary file over serial line"
U_BOOT_CMD(
loady, 3, 0, do_load_serial_bin,
"[ off ] [ baud ]\n"
" - load binary file over serial line"
/* -------------------------------------------------------------------- */
#if defined(CONFIG_CMD_HWFLOW)
int do_hwflow (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
{
extern int hwflow_onoff(int);
if (argc == 2) {
if (strcmp(argv[1], "off") == 0)
hwflow_onoff(-1);
else
if (strcmp(argv[1], "on") == 0)
hwflow_onoff(1);
else
return CMD_RET_USAGE;
}
printf("RTS/CTS hardware flow control: %s\n", hwflow_onoff(0) ? "on" : "off");
return 0;
}
/* -------------------------------------------------------------------- */
"turn RTS/CTS hardware flow control in serial line on/off",
"[on|off]"