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 a3c6c8c commit 610c704Copy full SHA for 610c704
cros_ec_python/devices/lpc.py
@@ -52,12 +52,14 @@ def detect() -> bool:
52
return True
53
54
@staticmethod
55
- def find_address(*addresses, portio: PortIO = PortIO()) -> int | None:
+ def find_address(*addresses, portio: PortIO | None = None) -> int | None:
56
"""
57
Find the EC memory map address.
58
:param addresses: A list of addresses to check.
59
:return: The address of the EC memory map, or None if not found.
60
61
+ if portio is None:
62
+ portio = PortIO()
63
for a in addresses:
64
if res := portio.ioperm(a, EC_MEMMAP_SIZE, True):
65
if res == errno.EPERM:
0 commit comments