mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
drivers/st7735: support for ST7789
ST7735 driver can also be used for ST7789. st7789 is simply defined as pseudomodule that pulls in automatically module st7735.
This commit is contained in:
parent
e487ac551a
commit
f57b6b70b8
@ -204,6 +204,10 @@ ifneq (,$(filter stmpe811_%,$(USEMODULE)))
|
||||
USEMODULE += stmpe811
|
||||
endif
|
||||
|
||||
ifneq (,$(filter st7789,$(USEMODULE)))
|
||||
USEMODULE += st7735
|
||||
endif
|
||||
|
||||
ifneq (,$(filter sx126%,$(USEMODULE)))
|
||||
USEMODULE += sx126x
|
||||
endif
|
||||
|
@ -28,6 +28,10 @@
|
||||
* when strictly necessary. This option will slow down the driver as it
|
||||
* certainly can't use DMA anymore, every short has to be converted before
|
||||
* transfer.
|
||||
*
|
||||
* @note The driver can also be used for the ST7789 which is compatible with
|
||||
* the ST7735 but supports higher resolutions. Just enable the module
|
||||
* `st7789` instead of `st7735` if your board uses the ST7789.
|
||||
*/
|
||||
|
||||
|
||||
|
@ -22,6 +22,16 @@ config HAVE_ST7735
|
||||
help
|
||||
Indicates that an ST7735 display is present.
|
||||
|
||||
config MODULE_ST7789
|
||||
bool "ST7789 display driver"
|
||||
select MODULE_ST7735
|
||||
|
||||
config HAVE_ST7789
|
||||
bool
|
||||
select MODULE_ST7789 if MODULE_DISP_DEV
|
||||
help
|
||||
Indicates that an ST7789 display is present.
|
||||
|
||||
menuconfig KCONFIG_USEMODULE_ST7735
|
||||
bool "Configure ST7735 driver"
|
||||
depends on USEMODULE_ST7735
|
||||
|
@ -1,2 +1,4 @@
|
||||
PSEUDOMODULES += st7789
|
||||
|
||||
USEMODULE_INCLUDES_st7735 := $(LAST_MAKEFILEDIR)/include
|
||||
USEMODULE_INCLUDES += $(USEMODULE_INCLUDES_st7735)
|
||||
|
@ -66,7 +66,12 @@ static uint8_t _st7735_calc_vml(int16_t vcoml)
|
||||
|
||||
static int _init(lcd_t *dev, const lcd_params_t *params)
|
||||
{
|
||||
assert(params->lines <= 162);
|
||||
if (IS_USED(MODULE_ST7789)) {
|
||||
assert(params->lines <= 320);
|
||||
}
|
||||
else {
|
||||
assert(params->lines <= 162);
|
||||
}
|
||||
dev->params = params;
|
||||
uint8_t command_params[4] = { 0 };
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user