diff --git a/drivers/Kconfig b/drivers/Kconfig index 2b16ea0337..06e0aec9a3 100644 --- a/drivers/Kconfig +++ b/drivers/Kconfig @@ -19,17 +19,20 @@ rsource "motor_driver/Kconfig" rsource "my9221/Kconfig" endmenu # Actuator Device Drivers +menu "Display Device Drivers" +rsource "disp_dev/Kconfig" +rsource "dsp0401/Kconfig" +rsource "hd44780/Kconfig" +rsource "ili9341/Kconfig" +endmenu # Display Device Drivers + menu "Miscellaneous Device Drivers" rsource "at/Kconfig" rsource "at24mac/Kconfig" -rsource "disp_dev/Kconfig" rsource "ds1307/Kconfig" rsource "ds3231/Kconfig" rsource "ds3234/Kconfig" -rsource "dsp0401/Kconfig" rsource "edbg_eui/Kconfig" -rsource "hd44780/Kconfig" -rsource "ili9341/Kconfig" rsource "io1_xplained/Kconfig" rsource "uart_half_duplex/Kconfig" endmenu # Miscellaneous Device Drivers diff --git a/drivers/ili9341/Kconfig b/drivers/ili9341/Kconfig index f63d082f74..78a30b0cfe 100644 --- a/drivers/ili9341/Kconfig +++ b/drivers/ili9341/Kconfig @@ -13,3 +13,47 @@ config MODULE_ILI9341 select MODULE_PERIPH_SPI select MODULE_PERIPH_GPIO select MODULE_XTIMER + +menuconfig KCONFIG_USEMODULE_ILI9341 + bool "Configure ILI9341 driver" + depends on USEMODULE_ILI9341 + help + Configure the ILI9341 display driver using Kconfig. + +if KCONFIG_USEMODULE_ILI9341 + +config ILI9341_GVDD + int "GVDD voltage level (in millivolts)" + default 4800 + range 3000 6000 + help + Configure GVDD level, which is a reference level for the VCOM level and + the grayscale voltage level. GVDD should be ≦ (AVDD - 0.5) V . + +config ILI9341_VCOMH + int "VCOMH voltage level (in millivolts)" + default 4250 + range 2700 5875 + help + Configure the high level of VCOM AC voltage. VCOM needs to be adjusted + to match the capacitance and performance specifications of the TFT panel + to maximize contrast and minimize flickering + +config ILI9341_VCOML + int "VCOML voltage level (in millivolts)" + default -2000 + range -2500 0 + help + Configure the low level of VCOM AC voltage. VCOM needs to be adjusted to + match the capacitance and performance specifications of the TFT panel to + maximize contrast and minimize flickering + +config ILI9341_LE_MODE + bool "Enable little endian to big endian conversion" + help + Enable this configuration to convert little endian colors to big endian. + ILI9341 device requires colors to be send in big endian RGB-565 format. + Enabling this option allows for little endian colors. Enabling this + however will slow down the driver as it cannot use DMA anymore. + +endif # KCONFIG_USEMODULE_ILI9341 diff --git a/tests/driver_ili9341/Makefile b/tests/driver_ili9341/Makefile index a62200a91c..be97670a5e 100644 --- a/tests/driver_ili9341/Makefile +++ b/tests/driver_ili9341/Makefile @@ -4,10 +4,13 @@ include ../Makefile.tests_common USEMODULE += ili9341 USEMODULE += xtimer -CFLAGS += -DCONFIG_ILI9341_LE_MODE - include $(RIOTBASE)/Makefile.include +# Check if being configured via Kconfig +ifndef CONFIG_KCONFIG_USEMODULE_ILI9341 +CFLAGS += -DCONFIG_ILI9341_LE_MODE +endif + # The AVR architecture stores the image in the RAM, this usually doesn't fit. # This flag excludes the image from the test ifneq (,$(filter arch_avr8,$(FEATURES_USED)))