We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 183b94e commit b2ee837Copy full SHA for b2ee837
src/pylibftdi/bitbang.py
@@ -158,7 +158,9 @@ def port(self):
158
159
@port.setter
160
def port(self, value):
161
+ # restrict to a single byte
162
+ value &= 0xFF
163
self._latch = value
164
if self.sync:
165
self.flush_output()
- return super().write(chr(value))
166
+ return super().write(value.to_bytes())
0 commit comments