diff --git a/boards/adafruit-pybadge/Kconfig b/boards/adafruit-pybadge/Kconfig index a82628e56f..43808cb611 100644 --- a/boards/adafruit-pybadge/Kconfig +++ b/boards/adafruit-pybadge/Kconfig @@ -23,7 +23,7 @@ config BOARD_ADAFRUIT_PYBADGE select HAS_PERIPH_UART select HAS_PERIPH_USBDEV - # select HAVE_ST7735 # not supported yet + select HAVE_ST7735 select HAVE_SAUL_GPIO select HAVE_MTD_SPI_NOR # This specific board requires SPI_ON_QSPI for the MTD_SPI_NOR diff --git a/boards/adafruit-pybadge/Makefile.dep b/boards/adafruit-pybadge/Makefile.dep index 7153734b75..04329e02fa 100644 --- a/boards/adafruit-pybadge/Makefile.dep +++ b/boards/adafruit-pybadge/Makefile.dep @@ -3,8 +3,7 @@ ifneq (,$(filter saul_default,$(USEMODULE))) endif ifneq (,$(filter disp_dev,$(USEMODULE))) - # Driver not supported yet - # USEMODULE += st7735 + USEMODULE += st7735 endif ifneq (,$(filter mtd,$(USEMODULE))) diff --git a/boards/adafruit-pybadge/board.c b/boards/adafruit-pybadge/board.c index 9a3655885f..ecd165d9d8 100644 --- a/boards/adafruit-pybadge/board.c +++ b/boards/adafruit-pybadge/board.c @@ -64,8 +64,7 @@ void board_init(void) gpio_set(SPEAKER_ENABLE_PIN); } - /* ST7735 driver is not supported yet uncomment the following code once it is */ - /* if (IS_USED(MODULE_ST7735)) { + if (IS_USED(MODULE_ST7735)) { gpio_init(BACKLIGHT_PIN, GPIO_OUT); - }*/ + } } diff --git a/boards/adafruit-pybadge/include/board.h b/boards/adafruit-pybadge/include/board.h index 290c8b33cc..7631899c64 100644 --- a/boards/adafruit-pybadge/include/board.h +++ b/boards/adafruit-pybadge/include/board.h @@ -67,13 +67,16 @@ extern "C" { * @name Display configuration (not supported yet) * @{ */ -#define ST7735_PARAM_SPI SPI_DEV(1) /**< SPI device */ -#define ST7735_PARAM_CS GPIO_PIN(PB, 7) /**< Chip select pin */ -#define ST7735_PARAM_DCX GPIO_PIN(PB, 5) /**< DCX pin */ -#define ST7735_PARAM_RST GPIO_PIN(PA, 0) /**< Reset pin */ -#define ST7735_PARAM_NUM_LINES (128U) /**< Number of screen lines */ -#define ST7735_PARAM_RGB (1) /**< RGB configuration */ -#define ST7735_PARAM_INVERTED (1) /**< Inversion configuration */ +#define ST7735_PARAM_SPI SPI_DEV(1) /**< SPI device */ +#define ST7735_PARAM_CS GPIO_PIN(PB, 7) /**< Chip select pin */ +#define ST7735_PARAM_DCX GPIO_PIN(PB, 5) /**< DCX pin */ +#define ST7735_PARAM_RST GPIO_PIN(PA, 0) /**< Reset pin */ +#define ST7735_PARAM_NUM_LINES (160U) /**< Number of screen lines */ +#define ST7735_PARAM_RGB_CHANNELS (128U) /**< Number of screen rgb channel (height) */ +#define ST7735_PARAM_RGB (1) /**< RGB configuration */ +#define ST7735_PARAM_INVERTED (0) /**< Inversion configuration */ +#define LCD_SCREEN_WIDTH (ST7735_PARAM_NUM_LINES) /**< LCD screen width */ +#define LCD_SCREEN_HEIGHT (ST7735_PARAM_RGB_CHANNELS) /**< LCD screen height */ /** @} */ /**