Commands to stlink devices are typically comprised of multiple
transactions with each transaction completing before moving to the next.
This change allows for multiple USB transactions to be issued at once
followed by a check that all transactions completed successfully. This
improves performance on some machines where there is a large turn-around
time between USB transfers such as is seen on some virtual machines.
This change is only supported when compiled with libusb1 as libusb1
supports and asynchronous interface.
Multi-transaction queueing introduced in this change paves the way for
improving speed of other transactions in the future such as memory and
register reads where multiple USB transactions in succession are
required to complete a command. Multiple USB transactions can be
submitted at once using jtag_libusb_bulk_transfer_n function.
Signed-off-by: Austin Phillips <email@example.com>
Reviewed-by: Andreas Bolsch <firstname.lastname@example.org>
Reviewed-by: Spencer Oliver <email@example.com>
Reviewed-by: Antonio Borneo <firstname.lastname@example.org>