From: hackbard Date: Sat, 21 Apr 2007 13:11:03 +0000 (+0000) Subject: fooblah X-Git-Url: https://hackdaworld.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=542e7de0178f5f23dabfe92f649b5e989f22e551;p=my-code%2Ffpga.git fooblah --- diff --git a/fx2/cypress_fx2_xilprg.patch b/fx2/cypress_fx2_xilprg.patch index 6b9f513..7d5ace2 100644 --- a/fx2/cypress_fx2_xilprg.patch +++ b/fx2/cypress_fx2_xilprg.patch @@ -244,7 +244,7 @@ diff -Nur xilprg-0.5/src/cable.cpp xilprg-new/src/cable.cpp return NULL; diff -Nur xilprg-0.5/src/onbusb.cpp xilprg-new/src/onbusb.cpp --- xilprg-0.5/src/onbusb.cpp 1970-01-01 01:00:00.000000000 +0100 -+++ xilprg-new/src/onbusb.cpp 2007-04-10 11:32:01.000000000 +0200 ++++ xilprg-new/src/onbusb.cpp 2007-04-21 14:12:15.000000000 +0200 @@ -0,0 +1,126 @@ +/* + * onboard usb @@ -350,7 +350,6 @@ diff -Nur xilprg-0.5/src/onbusb.cpp xilprg-new/src/onbusb.cpp +{ + if (bit) data |= 0x04; else data &= ~0x04; + data|=0xa0; -+ //usb_bulk_write(handle,0x01,&data,1,0); +} + +void onbusb::set_tck(int bit) @@ -358,18 +357,19 @@ diff -Nur xilprg-0.5/src/onbusb.cpp xilprg-new/src/onbusb.cpp + if (bit) data |= 0x10; else data &= ~0x10; + data|=0xa0; + usb_bulk_write(handle,0x01,&data,1,0); ++ // if(data&0x10) printf("tms: %d tdi: %d\n",data&0x08?1:0,data&0x04?1:0); +} + +void onbusb::set_tms(int bit) +{ + if (bit) data |= 0x08; else data &= ~0x08; + data|=0xa0; -+ //usb_bulk_write(handle,0x01,&data,1,0); +} + +int onbusb::get_tdo() +{ + usb_bulk_read(handle,0x81,&data,1,0); ++ // printf(" ----> %d\n",data&0x01?1:0); + return data & 0x01 ? 1 : 0; +} diff -Nur xilprg-0.5/src/onbusb.h xilprg-new/src/onbusb.h