Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I2CTarget not being deinited properly on soft restart #9809

Open
dhalbert opened this issue Nov 14, 2024 · 0 comments · May be fixed by #9810
Open

I2CTarget not being deinited properly on soft restart #9809

dhalbert opened this issue Nov 14, 2024 · 0 comments · May be fixed by #9810
Assignees
Labels
bug rp2 Both RP2 microcontrollers
Milestone

Comments

@dhalbert
Copy link
Collaborator

dhalbert commented Nov 14, 2024

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.

@dhalbert dhalbert added the bug label Nov 14, 2024
@dhalbert dhalbert added this to the 9.2.x milestone Nov 14, 2024
@dhalbert dhalbert added the rp2 Both RP2 microcontrollers label Nov 14, 2024
@dhalbert dhalbert self-assigned this Nov 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug rp2 Both RP2 microcontrollers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant