X-Git-Url: http://sigrok.org/gitweb/?p=sigrok-firmware-fx2lafw.git;a=blobdiff_plain;f=fx2lib%2Fexamples%2Fbulkloop%2Ftest.py;fp=fx2lib%2Fexamples%2Fbulkloop%2Ftest.py;h=0000000000000000000000000000000000000000;hp=80aaf812e51effe71fa31506ab46eb0e6a0a0289;hb=94ca1bed405209b1fa36466174449f07b14127ab;hpb=0bac7de529ed84f6b2236e41f435c5a4cd86ff95 diff --git a/fx2lib/examples/bulkloop/test.py b/fx2lib/examples/bulkloop/test.py deleted file mode 100644 index 80aaf812..00000000 --- a/fx2lib/examples/bulkloop/test.py +++ /dev/null @@ -1,39 +0,0 @@ -# Copyright (C) 2009 Ubixum, Inc. -# -# This library is free software; you can redistribute it and/or -# -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USAimport struct - - -import struct - -from fx2load import * - -openfx2(0x04b4,0x1004) - - -def do_bulk(): - # send 100 shorts to ep2 - - buf=struct.pack ( 'H'*100, *[i for i in range(100)] ) - f.ep_bulk( buf, 0x02, 1000) - - # read them back out - buf='\x00'*200 - f.ep_bulk( buf, 0x86, 1000) - - - print struct.unpack ( 'H'*100, buf ) - -[do_bulk() for i in range(3)]