Initialize Component Management
This commit is contained in:
@ -11,7 +11,7 @@ import javafx.scene.shape.Circle;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
public class IOPorts implements IOPortInterface {
|
||||
public class IOPorts extends PICComponent implements IOPortInterface {
|
||||
private final int A = 0;
|
||||
private final int B = 1;
|
||||
private final int PORTA = 5;
|
||||
@ -32,26 +32,10 @@ public class IOPorts implements IOPortInterface {
|
||||
private int RB6 = 0x40;
|
||||
private int RB7 = 0x80;
|
||||
|
||||
|
||||
private final DataRegisterInterface dataRegister;
|
||||
private final TimerInterface timer;
|
||||
private final InterruptInterface interrupts;
|
||||
private final TableInterface table;
|
||||
private final WindowManagement createWindow;
|
||||
private final FrontendControllerInterface frontendController;
|
||||
|
||||
public IOPorts (DataRegisterInterface dataRegister, FrontendControllerInterface frontendController, TimerInterface timer,
|
||||
InterruptInterface interrupts, TableInterface table, WindowManagement createWindow){
|
||||
|
||||
this.dataRegister = dataRegister;
|
||||
this.timer = timer;
|
||||
this.frontendController = frontendController;
|
||||
this.interrupts = interrupts;
|
||||
this.createWindow = createWindow;
|
||||
this.table = table;
|
||||
public IOPorts(){
|
||||
super();
|
||||
}
|
||||
|
||||
|
||||
public void setBit (int address, int bit){
|
||||
if (address < 7) {
|
||||
dataLatch[address - PORTA] |= (1 << bit);
|
||||
@ -238,7 +222,13 @@ public class IOPorts implements IOPortInterface {
|
||||
refreshPorts();
|
||||
}
|
||||
|
||||
public void resetTRIS (){
|
||||
public void resetTRIS (){ // Only Backend
|
||||
trisLatch = new int[] {0xFF, 0xFF};
|
||||
}
|
||||
|
||||
@Override
|
||||
public void initialize(PICComponents picComponents) {
|
||||
super.initialize(picComponents);
|
||||
System.out.println("IOPorts.\n");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user