CVS: python/msp430 jtag.py,1.16,1.17

Chris Liechti <[email protected]>
Newsgroups gmane.comp.hardware.texas-instruments.msp430.gcc.cvs
Message-ID <[email protected]>
Update of /cvsroot/mspgcc/python/msp430
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19305/python/msp430

Modified Files:
	jtag.py 
Log Message:
small API change: _parjtag.funclet works with milliseconds, the higher level API with seconds (float)

Index: jtag.py
===================================================================
RCS file: /cvsroot/mspgcc/python/msp430/jtag.py,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -w -d -r1.16 -r1.17
--- jtag.py	27 Dec 2005 16:22:10 -0000	1.16
+++ jtag.py	27 Dec 2005 16:28:54 -0000	1.17
@@ -245,7 +245,7 @@
             if status != STATUS_OK:
                 raise IOError("Could not erase the Flash")
 
-        def funclet(self, code, timeout=1):
+        def funclet(self, code, timeout=1000):
             """Download a 'funclet' contained in the string 'code' to the target
             and execute it. This function waits until the code stops on a "jmp $"
             or a timeout.
@@ -260,7 +260,7 @@
             status = MSP430_FuncletWait(code, size, 1, int(timeout*1000), ctypes.byref(runtime))
             if status != STATUS_OK:
                 raise IOError("Could not execute code")
-            return runtime.value/1000.0
+            return runtime.value
 
         def configure(self, mode, value = 0):
             """Configure the MSP430 driver."""
@@ -450,7 +450,7 @@
                 sys.stderr.flush()
             if len(self.data) != 1:
                 raise JTAGException("Funclets must have exactly one segment")
-            runtime = _parjtag.funclet(self.data[0].data, timeout)
+            runtime = _parjtag.funclet(self.data[0].data, timeout*1000) / 1000.0
             if runtime >= timeout:
                 sys.stderr.write("Funclet stopped on timeout\n")
                 sys.stderr.flush()



-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.