From 3b1748b6da4f2363fe16b650f2a21063579aa42e Mon Sep 17 00:00:00 2001 From: Kolja Waschk Date: Sun, 10 Feb 2008 10:00:30 +0000 Subject: [PATCH] Ignore flush(OPTIONALLY) by default. git-svn-id: https://urjtag.svn.sourceforge.net/svnroot/urjtag/trunk@1003 b68d4a1b-bc3d-0410-92ed-d4ac073336b7 --- jtag/src/tap/cable/ft2232.c | 2 ++ jtag/src/tap/cable/generic.c | 4 ++++ jtag/src/tap/cable/usbblaster.c | 2 ++ 3 files changed, 8 insertions(+) diff --git a/jtag/src/tap/cable/ft2232.c b/jtag/src/tap/cable/ft2232.c index 0ddb4bca..488c38f2 100644 --- a/jtag/src/tap/cable/ft2232.c +++ b/jtag/src/tap/cable/ft2232.c @@ -680,6 +680,8 @@ ft2232_flush( cable_t *cable, cable_flush_amount_t how_much ) { params_t *params = (params_t *)cable->params; + if( how_much == OPTIONALLY ) return; + while (cable->todo.num_items > 0) { int i, j, n; diff --git a/jtag/src/tap/cable/generic.c b/jtag/src/tap/cable/generic.c index ef70e54c..453fd09f 100644 --- a/jtag/src/tap/cable/generic.c +++ b/jtag/src/tap/cable/generic.c @@ -227,6 +227,8 @@ do_one_queued_action( cable_t *cable ) void generic_flush_one_by_one( cable_t *cable, cable_flush_amount_t how_much ) { + if( how_much == OPTIONALLY ) return; + while( do_one_queued_action( cable ) ); } @@ -236,6 +238,8 @@ generic_flush_using_transfer( cable_t *cable, cable_flush_amount_t how_much ) int i, j, n; char *in, *out; + if( how_much == OPTIONALLY ) return; + if(cable->todo.num_items == 0) return; do diff --git a/jtag/src/tap/cable/usbblaster.c b/jtag/src/tap/cable/usbblaster.c index e23c18ce..69cac14c 100644 --- a/jtag/src/tap/cable/usbblaster.c +++ b/jtag/src/tap/cable/usbblaster.c @@ -189,6 +189,8 @@ usbblaster_transfer( cable_t *cable, int len, char *in, char *out ) static void usbblaster_flush( cable_t *cable, cable_flush_amount_t how_much ) { + if( how_much == OPTIONALLY ) return; + while (cable->todo.num_items > 0) { int i, j, n, to_send = 0;