diff options
Diffstat (limited to 'libhw/w5500.c')
-rw-r--r-- | libhw/w5500.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libhw/w5500.c b/libhw/w5500.c index 08486d4..5678ffd 100644 --- a/libhw/w5500.c +++ b/libhw/w5500.c @@ -340,14 +340,14 @@ void _w5500_init(struct w5500 *chip, w5500_hard_reset(chip); /* Finally, wire in the interrupt handler. */ - cr_disable_interrupts(); + bool saved = cr_save_and_disable_interrupts(); for (size_t i = 0; i < ARRAY_LEN(w5500_chips); i++) { if (w5500_chips[i] == NULL) { w5500_chips[i] = chip; break; } } - cr_enable_interrupts(); + cr_restore_interrupts(saved); coroutine_add("w5500_irq", w5500_irq_cr, chip); } |