mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2025-01-18 12:52:44 +01:00
tests/driver_ili9341: add NO_RIOT_IMAGE option to Kconfig
This commit is contained in:
parent
e525e23143
commit
3bdbd67b70
15
tests/driver_ili9341/Kconfig
Normal file
15
tests/driver_ili9341/Kconfig
Normal file
@ -0,0 +1,15 @@
|
||||
# Copyright (c) 2021 HAW Hamburg
|
||||
#
|
||||
# This file is subject to the terms and conditions of the GNU Lesser
|
||||
# General Public License v2.1. See the file LICENSE in the top level
|
||||
# directory for more details.
|
||||
#
|
||||
|
||||
config NO_RIOT_IMAGE
|
||||
bool
|
||||
prompt "Avoid showing the RIOT logo on the test" if !HAS_ARCH_AVR8
|
||||
# the logo does not usually fit in AVR8
|
||||
default y if HAS_ARCH_AVR8
|
||||
help
|
||||
Say y to avoid loading the RIOT logo on the test application. Useful for architectures
|
||||
storing it in a limited RAM.
|
@ -5,15 +5,19 @@ USEMODULE += ili9341
|
||||
USEMODULE += ztimer
|
||||
USEMODULE += ztimer_msec
|
||||
|
||||
# As there is an 'Kconfig' we want to explicitly disable Kconfig by setting
|
||||
# the variable to empty
|
||||
SHOULD_RUN_KCONFIG ?=
|
||||
|
||||
include $(RIOTBASE)/Makefile.include
|
||||
|
||||
# Check if being configured via Kconfig
|
||||
ifndef CONFIG_KCONFIG_USEMODULE_ILI9341
|
||||
CFLAGS += -DCONFIG_ILI9341_LE_MODE
|
||||
endif
|
||||
CFLAGS += -DCONFIG_ILI9341_LE_MODE
|
||||
|
||||
# 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)))
|
||||
CFLAGS += -DNO_RIOT_IMAGE
|
||||
# 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)))
|
||||
CFLAGS += -DCONFIG_NO_RIOT_IMAGE
|
||||
endif
|
||||
endif
|
||||
|
@ -75,7 +75,7 @@ int main(void)
|
||||
/* Make the same square black again */
|
||||
ili9341_fill(&dev, 10, 59, 10, 109, 0x0000);
|
||||
|
||||
#ifndef NO_RIOT_IMAGE
|
||||
#ifndef CONFIG_NO_RIOT_IMAGE
|
||||
/* Approximate middle of the display */
|
||||
ili9341_pixmap(&dev, 95, 222, 85, 153, (const uint16_t *)picture);
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user