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

pkg/ucglib: migrate to ztimer

This commit is contained in:
Alexandre Abadie 2021-12-01 15:07:47 +01:00
parent 4f3a61c7dc
commit 24ff8f7ece
No known key found for this signature in database
GPG Key ID: 1C919A403CAE1405
4 changed files with 9 additions and 6 deletions

View File

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

View File

@ -1,4 +1,5 @@
USEMODULE += xtimer
USEMODULE += ztimer
USEMODULE += ztimer_usec
FEATURES_REQUIRED += periph_gpio

View File

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

View File

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