MCPcopy Create free account
hub / github.com/RetiredWizard/PyDOS / key

Method key

cpython/kbdFeatherWing/lib/bbq10keyboard.py:203–214  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

201
202 @property
203 def key(self):
204 if self.key_count == 0:
205 return None
206
207 with self._i2c as i2c:
208 self._buffer[0] = _REG_FIF
209 time.sleep(self._i2cdelay)
210 i2c.write(self._buffer, end=1)
211 time.sleep(self._i2cdelay)
212 i2c.readinto(self._buffer, end=2)
213
214 return (int(self._buffer[0]), chr(self._buffer[1]))
215
216 @property
217 def keys(self):

Callers

nothing calls this directly

Calls 2

readintoMethod · 0.80
writeMethod · 0.45

Tested by

no test coverage detected