diff --git a/pkg/ucglib/Kconfig b/pkg/ucglib/Kconfig index 168d425d24..5e40bcbe9b 100644 --- a/pkg/ucglib/Kconfig +++ b/pkg/ucglib/Kconfig @@ -10,7 +10,8 @@ config PACKAGE_UCGLIB depends on TEST_KCONFIG depends on HAS_PERIPH_GPIO select MODULE_PERIPH_GPIO - select MODULE_XTIMER + select MODULE_ZTIMER + select MODULE_ZTIMER_USEC select MODULE_UCGLIB_RIOT select MODULE_UCGLIB_CSRC diff --git a/pkg/ucglib/Makefile.dep b/pkg/ucglib/Makefile.dep index 29d5db25a0..cd5014c9e7 100644 --- a/pkg/ucglib/Makefile.dep +++ b/pkg/ucglib/Makefile.dep @@ -1,4 +1,5 @@ -USEMODULE += xtimer +USEMODULE += ztimer +USEMODULE += ztimer_usec FEATURES_REQUIRED += periph_gpio diff --git a/pkg/ucglib/contrib/ucg_riotos.c b/pkg/ucglib/contrib/ucg_riotos.c index b3f3f617fa..33449b648f 100644 --- a/pkg/ucglib/contrib/ucg_riotos.c +++ b/pkg/ucglib/contrib/ucg_riotos.c @@ -23,7 +23,7 @@ #include "ucg_riotos.h" -#include "xtimer.h" +#include "ztimer.h" #ifdef MODULE_PERIPH_SPI #include "periph/spi.h" @@ -98,7 +98,7 @@ int16_t ucg_com_hw_spi_riotos(ucg_t *ucg, int16_t msg, uint16_t arg, uint8_t *da spi_release(dev); break; case UCG_COM_MSG_DELAY: - xtimer_usleep(arg); + ztimer_sleep(ZTIMER_USEC, arg); break; case UCG_COM_MSG_CHANGE_RESET_LINE: if (ucg_riot_ptr != NULL && gpio_is_valid(ucg_riot_ptr->pin_reset)) { diff --git a/tests/pkg_ucglib/main.c b/tests/pkg_ucglib/main.c index 10abb7e514..0eef82921a 100644 --- a/tests/pkg_ucglib/main.c +++ b/tests/pkg_ucglib/main.c @@ -54,7 +54,8 @@ #include "periph/spi.h" #endif -#include "xtimer.h" +#include "timex.h" +#include "ztimer.h" #include "ucg.h" #include "ucg_riotos.h" @@ -139,7 +140,7 @@ int main(void) screen = (screen + 1) % 3; /* sleep a little */ - xtimer_sleep(1); + ztimer_sleep(ZTIMER_USEC, US_PER_SEC); } return 0;