Skip to content

Fixed issue with TypeError when running on RPi #13

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 14, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions adafruit_ra8875/ra8875.py
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,8 @@ def _write_data(self, data, raw=False):
"""
with self.spi_device as spi:
spi.write(reg.DATWR) # pylint: disable=no-member
if raw and isinstance(data, str):
data = bytes(data, 'utf8')
spi.write(data if raw else bytearray([data & 0xFF])) # pylint: disable=no-member

def _read_reg(self, cmd):
Expand Down