jeremyherbert / mcp2210-python

MCP22100 python driver
MIT License
6 stars 4 forks source link

Added functionality to find connected MCP2210 devices #8

Closed phoenixofhp closed 2 months ago

phoenixofhp commented 2 months ago

This pull request adds a new function, find_connected_mcp2210(), which searches for connected MCP2210 devices and returns their serial numbers. This function iterates over all HID devices with vendor ID 0x04d8 and product ID 0x00de, appends the serial number of each device to a list, and returns the list. If no devices are found, an empty list is returned.

crypto-lars commented 2 months ago

This pull request breaks compatibility with Python 3.8 since type hints are introduced in Python 3.9 unless you explicitly import the required functionality from the typing module e.g.

from typing import List

def find_connected_mcp2210() -> List[str]:

So there are two options, update the list of supported Python versions for this package and drop 3.8 support or fix the code. Both options would require a new release of the package, so fixing the code might be the best option.

phoenixofhp commented 2 months ago

Oops, sorry, i will create new pull request during the day

jeremyherbert commented 1 month ago

New version has been pushed to pypi.