big Peripheal refactor

This commit is contained in:
2023-06-04 20:52:24 +02:00
parent 2051f486d4
commit fd2b53167e
10 changed files with 86 additions and 72 deletions

View File

@@ -1,15 +1,17 @@
package kernel.peripherals;
import cc.Peripheral;
import lib.Rect;
import lib.Pos;
class Printer implements IPeripheral {
public static inline final TYPE_NAME:String = "printer";
private final native:cc.periphs.Printer.Printer;
private final addr:String;
public function new(native: cc.periphs.Printer.Printer, addr: String) {
this.native = native;
public function new(addr: String) {
this.native = Peripheral.wrap(addr);
this.addr = addr;
}