changes for LilyGO

This commit is contained in:
steve 2023-07-25 16:51:34 +01:00
parent 3dad91194e
commit 0700d2c1b8
4 changed files with 24 additions and 12 deletions

View File

@ -21,14 +21,24 @@ LIBRARIES := UTFT SD SpiRAM
endif
ifeq ($t, esp32)
BOARD := node32s
UPLOAD_SPEED := 921600
FS_DIR := programs
CPPFLAGS = -DDEBUGGING -DCPU_DEBUG \
-DUSER_SETUP_LOADED -DILI9341_DRIVER -DTFT_CS=5 -DTFT_DC=2 \
CPPFLAGS = -DDEBUGGING -DCPU_DEBUG -DTERMINAL_SPEED=$(TERMINAL_SPEED)
LIBRARIES = FS SPIFFS
ifeq ($b, lilygo)
BOARD := ttgo-t7-v14-mini32
SERIAL_PORT := /dev/ttyACM0
CPPFLAGS += -DHARDWARE_H=\"hw/lilygo-vga32.h\"
LIBRARIES += FabGL WiFi
else
BOARD := node32s
CPPFLAGS += -DUSER_SETUP_LOADED -DILI9341_DRIVER -DTFT_CS=5 -DTFT_DC=2 \
-DTFT_RST=-1 -DSPI_FREQUENCY=40000000 -DLOAD_GLCD \
-DHARDWARE_H=\"hw/esp32-espi.h\" -DTERMINAL_SPEED=$(TERMINAL_SPEED)
LIBRARIES = TFT_eSPI FS SPIFFS
-DHARDWARE_H=\"hw/esp32-espi.h\"
LIBRARIES += TFT_eSPI
endif
endif
include $t.mk

View File

@ -18,13 +18,15 @@
#define CPU_INSTRUCTIONS 1000
#define TFT_FG GREEN
#define TFT_BG BLACK
#define FG_COLOUR GREEN
#define BG_COLOUR BLACK
#if defined(USE_UTFT)
#define TFT_ORIENT landscape
#define ORIENT landscape
#elif defined(USE_ESPI)
#define TFT_ORIENT reverse_landscape
#define ORIENT reverse_landscape
#elif defined(USE_VGA)
#define ORIENT landscape
#endif
#if defined(USE_SD)

4
io.cpp
View File

@ -1,7 +1,7 @@
#include <Stream.h>
#include <stdint.h>
#include <memory.h>
#include <tftdisplay.h>
#include <display.h>
#include <serialio.h>
#include <filer.h>
#include <keyboard.h>
@ -18,7 +18,7 @@ static unsigned r, c;
static char screen[ROWS][COLS];
void io::reset() {
TFTDisplay::begin(TFT_BG, TFT_FG, TFT_ORIENT);
Display::begin(BG_COLOUR, FG_COLOUR, ORIENT);
clear();
_cy += 2;

2
io.h
View File

@ -2,7 +2,7 @@
#define _IO_H
// http://mamedev.org/source/src/mess/machine/apple1.c.html
class io: public TFTDisplay, Keyboard, public pia {
class io: public Display, Keyboard, public pia {
public:
io(filer &files): files(files) {}