Skip to content

Commit 08d82e7

Browse files
authored
Merge pull request #29 from caternuson/remove_ft232h
Remove FT232H stuff
2 parents 87bf59c + a6ee5a9 commit 08d82e7

File tree

1 file changed

+3
-16
lines changed

1 file changed

+3
-16
lines changed

adafruit_rgb_display/rgb.py

Lines changed: 3 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -41,26 +41,13 @@
4141

4242
# This is the size of the buffer to be used for fill operations, in 16-bit
4343
# units.
44+
_BUFFER_SIZE = 256
4445
try:
45-
# If we're on CPython, try to set as large as possible
4646
import platform
4747
if "CPython" in platform.python_implementation():
48-
# check for FT232H special case
49-
try:
50-
import os
51-
if os.environ['BLINKA_FT232H']:
52-
# we are limited by pyftdi's max SPI payload
53-
from pyftdi.spi import SpiController
54-
_BUFFER_SIZE = SpiController.PAYLOAD_MAX_LENGTH // 2 # max bytes / bytes per pixel
55-
except KeyError:
56-
# otherwise set it to blit the whole thing
57-
_BUFFER_SIZE = 320 * 240
58-
else:
59-
# in case CircuitPython ever implements platform
60-
_BUFFER_SIZE = 256
48+
_BUFFER_SIZE = 320 * 240 # blit the whole thing
6149
except ImportError:
62-
# Otherwise set smaller MCU friendly size
63-
_BUFFER_SIZE = 256
50+
pass
6451

6552
def color565(r, g=0, b=0):
6653
"""Convert red, green and blue values (0-255) into a 16-bit 565 encoding. As

0 commit comments

Comments
 (0)