Interrupts

This commit is contained in:
2024-06-02 16:37:53 +02:00
parent c49a073cfd
commit 2294f81766
10 changed files with 83 additions and 54 deletions

View File

@ -156,10 +156,14 @@ public class IOPorts {
int bit = params[1];
int value = params [2];
value = (value == 1) ? 0 : 1;
int oldValue = DataRegister.getDirectBit(port, bit);
DataRegister.setDirectBit(port, bit, value);
refreshPorts();
refreshTable(parent);
if (port == PORTB && bit >= 4)
Interrupts.triggerRBInterrupt(oldValue, value);
else if (port == PORTB && bit == 0)
Interrupts.triggerRB0Interrupt(oldValue, value);
}
public static void setLEDs (boolean[] leds) {