Skip to content

I2CTarget not being deinited properly on soft restart #9809

@dhalbert

Description

@dhalbert

CircuitPython version

Adafruit CircuitPython 9.2.0 on 2024-10-28; Raspberry Pi Pico with rp2040

Code/REPL

import board
from i2ctarget import I2CTarget
device = I2CTarget(board.GP3, board.GP2, (0x40,))

Behavior

Do the above once, then do ctrl-D, then do it again.

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ValueError: I2C peripheral in use

Without looking at all, I'm thinking switching to a finaliser will fix this. Should also check other ports.

Metadata

Metadata

Assignees

Labels

bugrp2Both RP2 microcontrollers

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions