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

Merge pull request #17917 from aabadie/pr/tests/common-riot-logo

tests: move riot_logo.h to tests base directory
This commit is contained in:
Alexandre Abadie 2022-04-13 12:28:03 +02:00 committed by GitHub
commit 2bd608accf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
10 changed files with 25 additions and 3190 deletions

View File

@ -5,6 +5,9 @@ DISABLE_MODULE += test_utils_interactive_sync
USEMODULE += disp_dev
# add include path for riot_logo.h
INCLUDES += -I$(RIOTBASE)/tests
include $(RIOTBASE)/Makefile.include
# Check if being configured via Kconfig

View File

@ -64,7 +64,12 @@ int main(void)
disp_dev_map(disp_dev->dev, 0, max_width - 1, y, y, display_buffer);
}
disp_dev_map(disp_dev->dev, 95, 222, 85, 153, (const uint16_t *)picture);
disp_dev_map(
disp_dev->dev,
((max_width - RIOT_LOGO_WIDTH) >> 1), ((max_width + RIOT_LOGO_WIDTH) >> 1) - 1,
((max_height - RIOT_LOGO_HEIGHT) >> 1), ((max_height + RIOT_LOGO_HEIGHT) >> 1) - 1,
(const uint16_t *)picture
);
puts("SUCCESS");

View File

@ -10,6 +10,9 @@ USEMODULE += ztimer_msec
# the variable to empty
SHOULD_RUN_KCONFIG ?=
# add include path for riot_logo.h
INCLUDES += -I$(RIOTBASE)/tests
include $(RIOTBASE)/Makefile.include
# Check if being configured via Kconfig

File diff suppressed because it is too large Load Diff

View File

@ -10,6 +10,9 @@ USEMODULE += ztimer_msec
# the variable to empty
SHOULD_RUN_KCONFIG ?=
# add include path for riot_logo.h
INCLUDES += -I$(RIOTBASE)/tests
include $(RIOTBASE)/Makefile.include
# Check if being configured via Kconfig

File diff suppressed because it is too large Load Diff

View File

@ -6,4 +6,7 @@ FEATURES_REQUIRED += periph_ltdc
USEMODULE += ztimer
USEMODULE += ztimer_msec
# add include path for riot_logo.h
INCLUDES += -I$(RIOTBASE)/tests
include $(RIOTBASE)/Makefile.include

View File

@ -30,8 +30,6 @@
#define RECT_WIDTH 200
#define RECT_HEIGHT 100
#define PICTURE_WIDTH 128
#define PICTURE_HEIGHT 69
int main(void)
{
@ -59,29 +57,29 @@ int main(void)
/* Display the RIOT logo in all 4 screen corners */
ltdc_map(
0, PICTURE_WIDTH - 1, 0, PICTURE_HEIGHT - 1,
0, RIOT_LOGO_WIDTH - 1, 0, RIOT_LOGO_HEIGHT - 1,
(const uint16_t *)picture
);
ztimer_sleep(ZTIMER_MSEC, MS_PER_SEC);
ltdc_clear();
ltdc_map(
LCD_SCREEN_WIDTH - PICTURE_WIDTH, LCD_SCREEN_WIDTH - 1, 0, PICTURE_HEIGHT - 1,
LCD_SCREEN_WIDTH - RIOT_LOGO_WIDTH, LCD_SCREEN_WIDTH - 1, 0, RIOT_LOGO_HEIGHT - 1,
(const uint16_t *)picture
);
ztimer_sleep(ZTIMER_MSEC, MS_PER_SEC);
ltdc_clear();
ltdc_map(
LCD_SCREEN_WIDTH - PICTURE_WIDTH, LCD_SCREEN_WIDTH - 1,
LCD_SCREEN_HEIGHT - PICTURE_HEIGHT, LCD_SCREEN_HEIGHT - 1,
LCD_SCREEN_WIDTH - RIOT_LOGO_WIDTH, LCD_SCREEN_WIDTH - 1,
LCD_SCREEN_HEIGHT - RIOT_LOGO_HEIGHT, LCD_SCREEN_HEIGHT - 1,
(const uint16_t *)picture
);
ztimer_sleep(ZTIMER_MSEC, MS_PER_SEC);
ltdc_clear();
ltdc_map(
0, PICTURE_WIDTH - 1, LCD_SCREEN_HEIGHT - PICTURE_HEIGHT, LCD_SCREEN_HEIGHT - 1,
0, RIOT_LOGO_WIDTH - 1, LCD_SCREEN_HEIGHT - RIOT_LOGO_HEIGHT, LCD_SCREEN_HEIGHT - 1,
(const uint16_t *)picture
);
ztimer_sleep(ZTIMER_MSEC, MS_PER_SEC);
@ -89,8 +87,8 @@ int main(void)
/* Display the RIOT logo in the center of the screen */
ltdc_map(
((LCD_SCREEN_WIDTH - PICTURE_WIDTH) >> 1), ((LCD_SCREEN_WIDTH + PICTURE_WIDTH) >> 1) - 1,
((LCD_SCREEN_HEIGHT - PICTURE_HEIGHT) >> 1), ((LCD_SCREEN_HEIGHT + PICTURE_HEIGHT) >> 1) - 1,
((LCD_SCREEN_WIDTH - RIOT_LOGO_WIDTH) >> 1), ((LCD_SCREEN_WIDTH + RIOT_LOGO_WIDTH) >> 1) - 1,
((LCD_SCREEN_HEIGHT - RIOT_LOGO_HEIGHT) >> 1), ((LCD_SCREEN_HEIGHT + RIOT_LOGO_HEIGHT) >> 1) - 1,
(const uint16_t *)picture
);

File diff suppressed because it is too large Load Diff