diff --git a/Makefile b/Makefile index 3ac1c01..2bb0999 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,7 @@ t ?= esp32 TERMINAL_SPEED := 115200 -CPPFLAGS = -DDEBUGGING -DCPU_DEBUG=false -DTERMINAL_SPEED=$(TERMINAL_SPEED) -DUSE_OWN_KBD +CPPFLAGS = -Wall -DDEBUGGING -DCPU_DEBUG=false -DTERMINAL_SPEED=$(TERMINAL_SPEED) -DUSE_OWN_KBD LIBRARIES = PS2KeyAdvanced PS2KeyMap ifeq ($t, esp8266) @@ -43,7 +43,9 @@ endif ifeq ($t, rp2040) BOARD := adafruit_feather_dvi FLASH := 8388608_2097152 -CPPFLAGS += -DHARDWARE_H=\"hw/adafruit_feather_dvi.h\" -DPS2_SERIAL_KBD=\"UK\" +CPPFLAGS += -DHARDWARE_H=\"hw/adafruit_feather_dvi.h\" -DUSE_SERIAL +#CPPFLAGS += -DHARDWARE_H=\"hw/adafruit_feather_dvi.h\" -DPS2_SERIAL_KBD=\"UK\" +CPPFLAGS += -DDVI_BIT_DEPTH=1 -DDVI_RESOLUTION=DVI_RES_640x240p60 LIBRARIES += LittleFS PicoDVI Adafruit_GFX Adafruit_BusIO Wire endif diff --git a/screen_disp.cpp b/screen_disp.cpp index aff16a0..1dc9d0d 100644 --- a/screen_disp.cpp +++ b/screen_disp.cpp @@ -16,7 +16,7 @@ const int TICK_FREQ = 2; void IRAM_ATTR screen_disp::on_tick() { static int tick = 0; - tick = ++tick % 3; + tick = (tick + 1) % 3; i->cursor(tick < 2); } @@ -28,8 +28,8 @@ void screen_disp::reset() { } Display::begin(BG_COLOUR, FG_COLOUR, ORIENT); + Display::setScreen(COLS * charWidth(), ROWS * charHeight()); Display::clear(); - _cy += 2; r = c = 0; for (int j = 0; j < ROWS; j++) @@ -45,7 +45,7 @@ void screen_disp::draw(char ch, int i, int j) { if (screen[j][i] != ch) { screen[j][i] = ch; char c[2] = { ch, 0 }; - drawString(c, i*_cx, j*_cy); + drawString(c, i * charWidth(), j * charHeight()); } }