1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

boards/adafruit-pybadge: enable ST7735 display

This commit is contained in:
Alexandre Abadie 2022-03-19 16:13:57 +01:00
parent 4d400307bf
commit 4af29ab549
No known key found for this signature in database
GPG Key ID: 1C919A403CAE1405
4 changed files with 14 additions and 13 deletions

View File

@ -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

View File

@ -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)))

View File

@ -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);
}*/
}
}

View File

@ -71,9 +71,12 @@ extern "C" {
#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_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 (1) /**< Inversion 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 */
/** @} */
/**