"""MCP2221 Device Class Definition"""
def __init__(self):
- pass # This is a "fake" implementation
+ pass # This is a "fake" implementation
def close(self):
"""Close the hid device. Does nothing if the device is not open."""
# try to close the device before destroying the instance
pass
-
def _hid_xfer(self, report, response=True):
"""Perform HID Transfer"""
return None
"""Get Current GPIO Pin Value"""
pass
-
# ----------------------------------------------------------------
# I2C
# ----------------------------------------------------------------
"""Perform an I2C Device Scan"""
pass
-
# ----------------------------------------------------------------
# ADC
# ----------------------------------------------------------------
# pylint: enable=unused-argument
-mcp2221 = MCP2221()
\ No newline at end of file
+mcp2221 = MCP2221()
def __init__(self, *, frequency=100000):
self._mcp2221 = mcp2221
- def scan(self, address_list = None):
+ def scan(self, address_list=None):
"""Mocks an I2C scan.
If address_list is not provided, this function returns a list of 3 randomly generated I2C addresses from 0x0 to 0x79.
For a stimulus-driven test: If address_list is provided, this function returns the provided address_list.
"""
pass
- # pylint: enable=unused-argument
\ No newline at end of file
+ # pylint: enable=unused-argument
if self.id is None:
raise RuntimeError("Can not init a None type pin.")
if pull is not None:
- raise NotImplementedError("Internal pullups and pulldowns not supported on the MCP2221")
+ raise NotImplementedError(
+ "Internal pullups and pulldowns not supported on the MCP2221"
+ )
if mode in (Pin.IN, Pin.OUT):
# All pins can do GPIO
pass
G3 = Pin(3)
SCL = Pin()
-SDA = Pin()
\ No newline at end of file
+SDA = Pin()