Skip to content

Commit 25c9109

Browse files
committed
update apps to use interface index for kernel driver attach
1 parent cdf96a0 commit 25c9109

File tree

2 files changed

+8
-4
lines changed
  • Fruit_Jam/Fruit_Jam_PyPaint
  • Metro/Metro_RP2350_Memory/memory_game

2 files changed

+8
-4
lines changed

Fruit_Jam/Fruit_Jam_PyPaint/code.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -680,8 +680,8 @@ def atexit_callback():
680680
print("inside atexit callback")
681681
if painter.mouse is not None:
682682
mouse = painter.mouse
683-
if mouse.was_attached and not mouse.device.is_kernel_driver_active(0):
684-
mouse.device.attach_kernel_driver(0)
683+
if mouse.was_attached and not mouse.device.is_kernel_driver_active(mouse.interface):
684+
mouse.device.attach_kernel_driver(mouse.interface)
685685
# The keyboard buffer seems to have data left over from when it was detached
686686
# This clears it before the next process starts
687687
while supervisor.runtime.serial_bytes_available:

Metro/Metro_RP2350_Memory/memory_game/code.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -311,8 +311,12 @@ def atexit_callback():
311311
"""
312312
print("inside atexit callback")
313313
if mouse is not None:
314-
if mouse_ptr.was_attached and not mouse_ptr.device.is_kernel_driver_active(0):
315-
mouse.attach_kernel_driver(0)
314+
if (
315+
mouse_ptr.was_attached and
316+
not mouse_ptr.device.is_kernel_driver_active(mouse_ptr.interface)
317+
):
318+
319+
mouse.attach_kernel_driver(mouse_ptr.interface)
316320
# The keyboard buffer seems to have data left over from when it was detached
317321
# This clears it before the next process starts
318322
while supervisor.runtime.serial_bytes_available:

0 commit comments

Comments
 (0)