1
0
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:
Leandro Lanzieri 2021-11-11 15:19:31 +01:00
parent e525e23143
commit 3bdbd67b70
No known key found for this signature in database
GPG Key ID: F4E9A721761C7593
3 changed files with 26 additions and 7 deletions

View 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.

View File

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

View File

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