X-Git-Url: http://developer.intra2net.com/git/?p=libftdi;a=blobdiff_plain;f=examples%2Fpython%2Fcomplete.py;h=cee917d917072b2ce0317ee08bbc649cc03dd9db;hp=cf60d4d31e7fafd7e275df72fdd3b05ce54f269f;hb=50d77f8f2e8f484106bf254a201b57b4c1572be7;hpb=9330b1205d8889de6586606228bfb5774491315b diff --git a/examples/python/complete.py b/examples/python/complete.py index cf60d4d..cee917d 100644 --- a/examples/python/complete.py +++ b/examples/python/complete.py @@ -63,6 +63,14 @@ ftdi.disable_bitbang( ftdic ) print '' +# read pins +ret, pins = ftdi.read_pins( ftdic ) +print 'pins:', +if ( ret == 0 ): + print '%02x' % ord( pins[0] ) +print '' + + # read chip id ret, chipid = ftdi.read_chipid( ftdic ) print 'FDTI chip id: %X\n' % chipid @@ -76,9 +84,10 @@ if (ret==0): print 'complete eeprom:' ret = ftdi.read_eeprom( ftdic ) -ret, eeprom = ftdi.get_eeprom_buf ( ftdic ) +size = 128 +ret, eeprom = ftdi.get_eeprom_buf ( ftdic, size ) if ( ret == 0 ): - for i in range( 128 ): + for i in range( size ): print '%02x' % ord( eeprom[i] ), if ( i % 8 == 7 ): print ''