diff --git a/drivers/lcd/include/lcd_internal.h b/drivers/lcd/include/lcd_internal.h index 024747af60..50fc6cf0fe 100644 --- a/drivers/lcd/include/lcd_internal.h +++ b/drivers/lcd/include/lcd_internal.h @@ -35,6 +35,7 @@ extern "C" { */ #define LCD_CMD_SWRESET 0x01 /**< Software reset */ #define LCD_CMD_RDDIDIF 0x04 /**< Read display ID */ +#define LCD_CMD_RDDST 0x09 /**< Read display status */ #define LCD_CMD_SLPIN 0x10 /**< Enter sleep mode */ #define LCD_CMD_SLPOUT 0x11 /**< Sleep out */ #define LCD_CMD_NORON 0x13 /**< Normal display mode on */ diff --git a/tests/drivers/st77xx/main.c b/tests/drivers/st77xx/main.c index 8421325aa2..d6bfffec4d 100644 --- a/tests/drivers/st77xx/main.c +++ b/tests/drivers/st77xx/main.c @@ -25,6 +25,7 @@ #include "ztimer.h" #include "board.h" #include "lcd.h" +#include "lcd_internal.h" #include "riot_logo.h" @@ -54,6 +55,18 @@ int main(void) return 1; } +#if MODULE_LCD_PARALLEL + if (gpio_is_valid(st77xx_params[0].rdx_pin)) { + uint8_t data[4]; + + lcd_read_cmd(&dev, LCD_CMD_RDDIDIF, data, 3); + printf("lcd ID: %02x %02x %02x\n", data[0], data[1], data[2]); + + lcd_read_cmd(&dev, LCD_CMD_RDDST, data, 4); + printf("lcd status: %02x %02x %02x %02x\n", data[0], data[1], data[2], data[3]); + } +#endif + puts("lcd TFT display filling map"); lcd_fill(&dev, 0, dev.params->lines, 0, dev.params->rgb_channels, 0x0000); puts("lcd TFT display map filled");