From 1fcff6cb8ccec10b9ee12e02579a13befaa675fe Mon Sep 17 00:00:00 2001 From: Josh Klar Date: Sun, 30 Sep 2018 16:32:20 -0700 Subject: [PATCH] Stub pyb.hid_keyboard for tests --- upy-unix-stubs/pyb/__init__.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/upy-unix-stubs/pyb/__init__.py b/upy-unix-stubs/pyb/__init__.py index e69de29..9b894c1 100644 --- a/upy-unix-stubs/pyb/__init__.py +++ b/upy-unix-stubs/pyb/__init__.py @@ -0,0 +1,14 @@ +try: + from collections import namedtuple +except ImportError: + from ucollections import namedtuple + +HIDMode = namedtuple('HIDMode', ( + 'subclass', + 'protocol', + 'max_packet_length', + 'polling_interval', + 'report_descriptor', +)) + +hid_keyboard = HIDMode(0, 0, 0, 0, bytearray(0))