mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
drivers/stmpe811: migrate to ztimer
This commit is contained in:
parent
15165bfdf7
commit
0076eb83fc
@ -9,9 +9,12 @@ config MODULE_STMPE811
|
||||
bool
|
||||
depends on HAS_PERIPH_GPIO
|
||||
depends on HAS_PERIPH_GPIO_IRQ
|
||||
depends on HAS_PERIPH_I2C
|
||||
depends on TEST_KCONFIG
|
||||
select MODULE_PERIPH_GPIO
|
||||
select MODULE_PERIPH_GPIO_IRQ
|
||||
select MODULE_XTIMER
|
||||
select MODULE_ZTIMER
|
||||
select MODULE_ZTIMER_MSEC
|
||||
depends on TEST_KCONFIG
|
||||
|
||||
choice
|
||||
|
@ -8,4 +8,5 @@ ifneq (,$(filter stmpe811_i2c,$(USEMODULE)))
|
||||
FEATURES_REQUIRED += periph_i2c
|
||||
endif
|
||||
|
||||
USEMODULE += xtimer
|
||||
USEMODULE += ztimer
|
||||
USEMODULE += ztimer_msec
|
||||
|
@ -20,7 +20,7 @@
|
||||
|
||||
#include <inttypes.h>
|
||||
|
||||
#include "xtimer.h"
|
||||
#include "ztimer.h"
|
||||
#if IS_USED(MODULE_STMPE811_SPI)
|
||||
#include "periph/spi.h"
|
||||
#else
|
||||
@ -135,13 +135,13 @@ static int _soft_reset(const stmpe811_t *dev)
|
||||
DEBUG("[stmpe811] soft reset: cannot write soft reset bit to SYS_CTRL1 register\n");
|
||||
return -EPROTO;
|
||||
}
|
||||
xtimer_msleep(10);
|
||||
ztimer_sleep(ZTIMER_MSEC, 10);
|
||||
|
||||
if (_write_reg(dev, STMPE811_SYS_CTRL1, 0) < 0) {
|
||||
DEBUG("[stmpe811] soft reset: cannot clear SYS_CTRL1 register\n");
|
||||
return -EPROTO;
|
||||
}
|
||||
xtimer_msleep(2);
|
||||
ztimer_sleep(ZTIMER_MSEC, 2);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
3
tests/driver_stmpe811/Makefile.ci
Normal file
3
tests/driver_stmpe811/Makefile.ci
Normal file
@ -0,0 +1,3 @@
|
||||
BOARD_INSUFFICIENT_MEMORY := \
|
||||
nucleo-l011k4 \
|
||||
#
|
Loading…
Reference in New Issue
Block a user