diff options
author | Maxwell Beck <max@rastertail.net> | 2025-07-20 16:30:54 -0500 |
---|---|---|
committer | Maxwell Beck <max@rastertail.net> | 2025-07-20 16:30:54 -0500 |
commit | 3cefba9f8727001e0ec0fb6af1e6c3377fbfd34c (patch) | |
tree | 71d7aae3591a912ffe389d9b9787583b110c2564 /src | |
parent | 039f2b9965ac716f7cb24c3563f6a9bf9e3038da (diff) |
fix: Corrent IRQ handling
Diffstat (limited to 'src')
-rw-r--r-- | src/pico1541.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/pico1541.c b/src/pico1541.c index 9864c89..3bf52a8 100644 --- a/src/pico1541.c +++ b/src/pico1541.c @@ -275,7 +275,9 @@ DRESULT disk_ioctl(BYTE pdrv, BYTE cmd, void *buff) { } void drive_irq() { + multicore_fifo_pop_blocking(); drive_cycle(&drive); + multicore_fifo_clear_irq(); } void drive_thread() { @@ -283,6 +285,7 @@ void drive_thread() { drive.image = disk; irq_set_exclusive_handler(SIO_IRQ_PROC1, drive_irq); + irq_set_priority(SIO_IRQ_PROC1, 0); irq_set_enabled(SIO_IRQ_PROC1, true); multicore_fifo_push_blocking(1); |