File tree Expand file tree Collapse file tree 1 file changed +3
-16
lines changed Expand file tree Collapse file tree 1 file changed +3
-16
lines changed Original file line number Diff line number Diff line change 41
41
42
42
# This is the size of the buffer to be used for fill operations, in 16-bit
43
43
# units.
44
+ _BUFFER_SIZE = 256
44
45
try :
45
- # If we're on CPython, try to set as large as possible
46
46
import platform
47
47
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
61
49
except ImportError :
62
- # Otherwise set smaller MCU friendly size
63
- _BUFFER_SIZE = 256
50
+ pass
64
51
65
52
def color565 (r , g = 0 , b = 0 ):
66
53
"""Convert red, green and blue values (0-255) into a 16-bit 565 encoding. As
You can’t perform that action at this time.
0 commit comments