Skip to content

Commit 76fc75b

Browse files
at86rf231: replace vtimer_usleep by hwtimer_wait
This fixes a bug where the callback to unlock the thread, put to sleep by `vtimer_usleep` wouldn't be woken up due to overhead. Using hwtimer_wait works for now, but this section will be replaced a driver refactor anyway.
1 parent ec24fbd commit 76fc75b

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

drivers/at86rf231/at86rf231.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
#include "periph/spi.h"
2727
#include "kernel_types.h"
2828
#include "transceiver.h"
29-
#include "vtimer.h"
29+
#include "hwtimer.h"
3030

3131
#define ENABLE_DEBUG (0)
3232
#include "debug.h"
@@ -101,7 +101,7 @@ void at86rf231_switch_to_rx(void)
101101
do {
102102
status = at86rf231_get_status();
103103

104-
vtimer_usleep(10);
104+
hwtimer_wait(HWTIMER_TICKS(10));
105105

106106
if (!--max_wait) {
107107
printf("at86rf231 : ERROR : could not enter RX_ON mode\n");
@@ -258,4 +258,3 @@ void at86rf231_reset(void)
258258
} while ((status & AT86RF231_TRX_STATUS_MASK__TRX_STATUS)
259259
!= AT86RF231_TRX_STATUS__TRX_OFF);
260260
}
261-

0 commit comments

Comments
 (0)