adafruit / Adafruit_Blinka

Add CircuitPython hardware API and libraries to MicroPython & CPython devices
https://learn.adafruit.com/circuitpython-on-raspberrypi-linux
MIT License
438 stars 328 forks source link

Add support for "fake" MCP2221 #807

Closed brentru closed 2 months ago

brentru commented 2 months ago

This pull request adds Blinka support for a "fake" MCP2221 device. This means that no device is attached and the environment will mock the CircuitPython hardware API layer.

To test, set the following environment variables in either your shell or a CPython script:

os.environ["BLINKA_FORCEBOARD"] = "MICROCHIP_MCP2221"
os.environ["BLINKA_ FORCECHIP"] = "MCP2221"

Implemented and tested on CPython: