@@ -472,8 +472,8 @@ def write(self, data):
472
472
"""
473
473
#check for hardware limit of FT232H and similar MPSSE chips
474
474
if (len (data ) > 65536 ):
475
- print 'the FTDI chip is limited to 65536 bytes (64 KB) of input/output per command!'
476
- print 'use for loops for larger reads'
475
+ print ( 'the FTDI chip is limited to 65536 bytes (64 KB) of input/output per command!' )
476
+ print ( 'use for loops for larger reads' )
477
477
exit (1 )
478
478
# Build command to write SPI data.
479
479
command = 0x10 | (self .lsbfirst << 3 ) | self .write_clock_ve
@@ -504,8 +504,8 @@ def read(self, length):
504
504
"""
505
505
#check for hardware limit of FT232H and similar MPSSE chips
506
506
if (1 > length > 65536 ):
507
- print 'the FTDI chip is limited to 65536 bytes (64 KB) of input/output per command!'
508
- print 'use for loops for larger reads'
507
+ print ( 'the FTDI chip is limited to 65536 bytes (64 KB) of input/output per command!' )
508
+ print ( 'use for loops for larger reads' )
509
509
exit (1 )
510
510
# Build command to read SPI data.
511
511
command = 0x20 | (self .lsbfirst << 3 ) | (self .read_clock_ve << 2 )
@@ -545,8 +545,8 @@ def bulkread(self, data = [], lengthR = 'None', readmode = 1):
545
545
"""
546
546
#check for hardware limit of FT232H and similar MPSSE chips
547
547
if (1 > lengthR > 65536 )| (len (data ) > 65536 ):
548
- print 'the FTDI chip is limited to 65536 bytes (64 KB) of input/output per command!'
549
- print 'use for loops for larger reads'
548
+ print ( 'the FTDI chip is limited to 65536 bytes (64 KB) of input/output per command!' )
549
+ print ( 'use for loops for larger reads' )
550
550
exit (1 )
551
551
#default mode is to act like `transfer` but half-duplex
552
552
if (lengthR == 'None' )& (readmode == 1 ):
@@ -592,8 +592,8 @@ def transfer(self, data):
592
592
"""
593
593
#check for hardware limit of FT232H and similar MPSSE chips
594
594
if (len (data ) > 65536 ):
595
- print 'the FTDI chip is limited to 65536 bytes (64 KB) of input/output per command!'
596
- print 'use for loops for larger reads'
595
+ print ( 'the FTDI chip is limited to 65536 bytes (64 KB) of input/output per command!' )
596
+ print ( 'use for loops for larger reads' )
597
597
exit (1 )
598
598
# Build command to read and write SPI data.
599
599
command = 0x30 | (self .lsbfirst << 3 ) | (self .read_clock_ve << 2 ) | self .write_clock_ve
0 commit comments