diff options
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/i2c.py | 10 | ||||
-rw-r--r-- | scripts/transitioncounter.py | 8 |
2 files changed, 9 insertions, 9 deletions
diff --git a/scripts/i2c.py b/scripts/i2c.py index 0854895..602b010 100644 --- a/scripts/i2c.py +++ b/scripts/i2c.py @@ -68,7 +68,7 @@ # TODO: Return two buffers, one with structured data for the GUI to parse # and display, and one with human-readable ASCII output. -def sigrokdecode_i2c(inbuf): +def decode(inbuf): """I2C protocol decoder""" # FIXME: This should be passed in as metadata, not hardcoded here. @@ -153,20 +153,20 @@ def register(): return { 'id': 'i2c', 'name': 'I2C', - 'description': 'Inter-Integrated Circuit (I2C) bus', - 'function': 'sigrokdecode_i2c', + 'desc': 'Inter-Integrated Circuit (I2C) bus', + 'func': 'decode', 'inputformats': ['raw'], 'signalnames': { 'SCL': 'Serial clock line', 'SDA': 'Serial data line', }, - 'ouputformats': ['i2c', 'ascii'], + 'outputformats': ['i2c', 'ascii'], } # Use psyco (if available) as it results in huge performance improvements. try: import psyco - psyco.bind(sigrokdecode_i2c) + psyco.bind(decode) except ImportError: pass diff --git a/scripts/transitioncounter.py b/scripts/transitioncounter.py index a9e83f7..4064d2f 100644 --- a/scripts/transitioncounter.py +++ b/scripts/transitioncounter.py @@ -18,7 +18,7 @@ ## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA ## -def sigrokdecode_count_transitions(inbuf): +def decode(inbuf): """Counts the low->high and high->low transitions in the specified channel(s) of the signal.""" @@ -81,8 +81,8 @@ def register(): return { 'id': 'transitioncounter', 'name': 'Transition counter', - 'description': 'TODO', - 'function': 'sigrokdecode_count_transitions', + 'desc': 'TODO', + 'func': 'decode', 'inputformats': ['raw'], 'signalnames': {}, # FIXME 'outputformats': ['transitioncounts'], @@ -91,7 +91,7 @@ def register(): # Use psyco (if available) as it results in huge performance improvements. try: import psyco - psyco.bind(sigrokdecode_count_transitions) + psyco.bind(decode) except ImportError: pass |