mirror of
https://github.com/pimoroni/st7735-python.git
synced 2025-01-05 22:40:25 +03:00
@@ -206,10 +206,7 @@ class ST7735(object):
|
|||||||
# Convert scalar argument to list so either can be passed as parameter.
|
# Convert scalar argument to list so either can be passed as parameter.
|
||||||
if isinstance(data, numbers.Number):
|
if isinstance(data, numbers.Number):
|
||||||
data = [data & 0xFF]
|
data = [data & 0xFF]
|
||||||
# Write data a chunk at a time.
|
self._spi.xfer3(data)
|
||||||
for start in range(0, len(data), chunk_size):
|
|
||||||
end = min(start + chunk_size, len(data))
|
|
||||||
self._spi.xfer(data[start:end])
|
|
||||||
|
|
||||||
def set_backlight(self, value):
|
def set_backlight(self, value):
|
||||||
"""Set the backlight on/off."""
|
"""Set the backlight on/off."""
|
||||||
|
|||||||
@@ -19,4 +19,5 @@ setup(name='ST7735',
|
|||||||
author_email='phil@pimoroni.com',
|
author_email='phil@pimoroni.com',
|
||||||
classifiers=classifiers,
|
classifiers=classifiers,
|
||||||
url='https://github.com/pimoroni/st7735-160x80-python/',
|
url='https://github.com/pimoroni/st7735-160x80-python/',
|
||||||
packages=find_packages())
|
packages=find_packages(),
|
||||||
|
install_requires=['spidev>=3.4'])
|
||||||
|
|||||||
Reference in New Issue
Block a user