mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2025-01-18 12:52:44 +01:00
tests/driver_ili9341: use ztimer_msec instead of xtimer
This commit is contained in:
parent
bac1f8c82d
commit
d2c09698e0
@ -2,7 +2,8 @@ BOARD ?= stm32f429i-disc1
|
||||
include ../Makefile.tests_common
|
||||
|
||||
USEMODULE += ili9341
|
||||
USEMODULE += xtimer
|
||||
USEMODULE += ztimer
|
||||
USEMODULE += ztimer_msec
|
||||
|
||||
include $(RIOTBASE)/Makefile.include
|
||||
|
||||
|
@ -1,4 +1,5 @@
|
||||
# this file enables modules defined in Kconfig. Do not use this file for
|
||||
# application configuration. This is only needed during migration.
|
||||
CONFIG_MODULE_ILI9341=y
|
||||
CONFIG_MODULE_XTIMER=y
|
||||
CONFIG_MODULE_ZTIMER=y
|
||||
CONFIG_MODULE_ZTIMER_MSEC=y
|
||||
|
@ -19,7 +19,8 @@
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include "xtimer.h"
|
||||
#include "timex.h"
|
||||
#include "ztimer.h"
|
||||
#include "board.h"
|
||||
#include "ili9341.h"
|
||||
#include "ili9341_params.h"
|
||||
@ -55,19 +56,19 @@ int main(void)
|
||||
/* Fill square with blue */
|
||||
puts("Drawing blue rectangle");
|
||||
ili9341_fill(&dev, 10, 59, 10, 109, 0x001F);
|
||||
xtimer_sleep(1);
|
||||
ztimer_sleep(ZTIMER_MSEC, 1 * MS_PER_SEC);
|
||||
|
||||
puts("Drawing green rectangle");
|
||||
ili9341_fill(&dev, 10, 59, 10, 109, 0x07E0);
|
||||
xtimer_sleep(1);
|
||||
ztimer_sleep(ZTIMER_MSEC, 1 * MS_PER_SEC);
|
||||
|
||||
puts("Drawing red rectangle");
|
||||
ili9341_fill(&dev, 10, 59, 10, 109, 0xf800);
|
||||
xtimer_sleep(1);
|
||||
ztimer_sleep(ZTIMER_MSEC, 1 * MS_PER_SEC);
|
||||
|
||||
ili9341_invert_on(&dev);
|
||||
puts("ili9341 TFT display inverted");
|
||||
xtimer_sleep(1);
|
||||
ztimer_sleep(ZTIMER_MSEC, 1 * MS_PER_SEC);
|
||||
ili9341_invert_off(&dev);
|
||||
puts("ili9341 TFT display normal");
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user