PIC: Ignore IRQ raise or lower then the PIC is not yet properly set up.

This commit is contained in:
OBattler
2025-07-30 15:04:30 +02:00
parent 9cb99ed476
commit 4537db4830

View File

@@ -693,6 +693,13 @@ picint_common(uint16_t num, int level, int set, uint8_t *irq_state)
uint16_t lines = level ? 0x0000 : num;
pic_t *dev;
/*
Do this because some emulated cards will, for whatever reason, attempt to
raise an IRQ at init when the PIC has not yet been properly initialized.
*/
if (update_pending == NULL)
return;
/* Make sure to ignore all slave IRQ's, and in case of AT+,
translate IRQ 2 to IRQ 9. */
for (uint8_t i = 0; i < 8; i++) {