diff --git a/Makefile.dep b/Makefile.dep index 378d1fed07a53c0d39bc366d6ce1ed2ab36309e0..c0f1eceec9d62f38ea5320867b213bb79816cc6d 100644 --- a/Makefile.dep +++ b/Makefile.dep @@ -22,6 +22,7 @@ endif ifneq (,$(filter xbee,$(USEMODULE))) USEMODULE += ieee802154 + USEMODULE += xtimer endif ifneq (,$(filter gnrc_zep,$(USEMODULE))) diff --git a/drivers/xbee/xbee.c b/drivers/xbee/xbee.c index 9b6303dbd2d006581e5a41830abc4965f54a29bb..21e34d8382e09753f76a959aa452bb3b80f547b3 100644 --- a/drivers/xbee/xbee.c +++ b/drivers/xbee/xbee.c @@ -23,7 +23,7 @@ #include <string.h> #include "xbee.h" -#include "hwtimer.h" +#include "xtimer.h" #include "msg.h" #include "net/eui64.h" #include "net/ieee802154.h" @@ -455,13 +455,13 @@ int xbee_init(xbee_t *dev, uart_t uart, uint32_t baudrate, /* if reset pin is connected, do a hardware reset */ if (reset_pin != GPIO_UNDEF) { gpio_clear(reset_pin); - hwtimer_wait(HWTIMER_TICKS(RESET_DELAY)); + xtimer_usleep(RESET_DELAY); gpio_set(reset_pin); } /* put the XBee device into command mode */ - hwtimer_wait(HWTIMER_TICKS(ENTER_CMD_MODE_DELAY)); + xtimer_usleep(ENTER_CMD_MODE_DELAY); _at_cmd(dev, "+++"); - hwtimer_wait(HWTIMER_TICKS(ENTER_CMD_MODE_DELAY)); + xtimer_usleep(ENTER_CMD_MODE_DELAY); /* disable non IEEE802.15.4 extensions */ _at_cmd(dev, "ATMM2\r"); /* put XBee module in "API mode without escaped characters" */