root/usb_console/i2c_pin_data.py

Revision 454:3333270c2a78, 298 bytes (checked in by Maxime Petazzoni <maxime.petazzoni@…>, 14 months ago)

Improved USB dump reading utility.

  • Property exe set to *
Line 
1#!/usr/bin/env python
2
3# I2C pin information beautifier
4def beautify(data, size):
5    print "SDA:",
6    s = ""
7    for i in xrange(size/2):
8        s = "%s%s" % (s, data[2*i])
9    print s
10
11    print "SCL:",
12    s = ""
13    for i in xrange(size/2):
14        s = "%s%s" % (s, data[2*i+1])
15    print s
16
Note: See TracBrowser for help on using the browser.