Update UnitTest example

This commit is contained in:
lewishe
2023-04-12 13:35:53 +08:00
parent 0aec97510a
commit c056f2e26b
2 changed files with 4 additions and 8 deletions
+4 -7
View File
@@ -588,7 +588,6 @@ void initBoard()
pinMode(BOARD_SPI_MISO, INPUT_PULLUP);
SPI.begin(BOARD_SPI_SCK, BOARD_SPI_MISO, BOARD_SPI_MOSI); //SD
pinMode(BOARD_BOOT, INPUT_PULLUP);
pinMode(BOARD_TBOX_UP, INPUT_PULLUP);
pinMode(BOARD_TBOX_DOWN, INPUT_PULLUP);
pinMode(BOARD_TBOX_LEFT, INPUT_PULLUP);
@@ -609,15 +608,13 @@ void initBoard()
tft.fillScreen(TFT_BLACK);
Wire.begin(BOARD_I2C_SDA, BOARD_I2C_SCL);
// Set touch int input
pinMode(BOARD_TOUCH_INT, INPUT); delay(20);
scanDevices(&Wire);
touch.init();
// int16_t x, y;
// while (1) {
// getTouch(x, y); delay(10);
// }
Wire.beginTransmission(GT911_SLAVE_ADDRESS1);
ret = Wire.endTransmission() == 0;
@@ -828,7 +825,7 @@ static void mouse_read(lv_indev_drv_t *indev, lv_indev_data_t *data)
BOARD_TBOX_DOWN,
BOARD_TBOX_LEFT,
BOARD_TBOX_RIGHT,
BOARD_BOOT
BOARD_BOOT_PIN
};
static bool last_dir[5];
uint8_t pos = 50;
-1
View File
@@ -36,7 +36,6 @@
#define BOARD_SPI_MISO 38
#define BOARD_SPI_SCK 40
#define BOARD_BOOT 0
#define BOARD_TBOX_UP 3
#define BOARD_TBOX_DOWN 2
#define BOARD_TBOX_LEFT 1