]> git.baikalelectronics.ru Git - uboot.git/commit
xyz-modem: Allow to cancel transfer also by CTRL+C
authorPali Rohár <pali@kernel.org>
Tue, 3 Aug 2021 14:28:44 +0000 (16:28 +0200)
committerTom Rini <trini@konsulko.com>
Fri, 3 Sep 2021 18:32:41 +0000 (14:32 -0400)
commit12fa6fff81e158eef1225a01266dd5045e29e757
tree40d868670757b71fc97cab910df5a31f70907322
parentafab35d4d0b3f71e6715513b7cd407817ed2e5f9
xyz-modem: Allow to cancel transfer also by CTRL+C

Currently it is possible to cancel loadx and loady commands by pressing
CTRL+X (CAN character) at least 3 times quickly.

All other U-Boot commands, including loadb and loads can be cancelled by
CTRL+C. So allow it also in xyz-modem code used by loadx and loady
commands. Implement it by handling CTRL+C (ETX character) in the same way
as CTRL+X (CAN character).

Due to how x/y-modem protocol works, it is required to press
CTRL+C or CTRL+X at least 3 times quickly.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
common/xyzModem.c