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:
commit
2bd608accf
@ -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
|
||||
|
@ -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");
|
||||
|
||||
|
@ -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
@ -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
@ -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
|
||||
|
@ -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
Loading…
Reference in New Issue
Block a user