From: Joel Holdsworth Date: Sat, 18 Feb 2012 12:52:24 +0000 (+0000) Subject: Added a debug client X-Git-Tag: sigrok-firmware-fx2lafw-0.1.0~74 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=4329f2ed3c366517be5ecbff95a83cf3998ea288;p=sigrok-firmware-fx2lafw.git Added a debug client --- diff --git a/tools/debug.py b/tools/debug.py new file mode 100755 index 00000000..cd197762 --- /dev/null +++ b/tools/debug.py @@ -0,0 +1,31 @@ +#!/usr/bin/python +# This file is part of the fx2lafw project. +# +# Copyright (C) 2012 Joel Holdsworth +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program 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 General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +import struct + +from fx2load import * + +# Connect to the device +openfx2(0x6666, 0x0019) + +# Read debug messages +while 1: + buf='\x00'*200 + f.ep_bulk( buf, 0x86, 1000) + print buf