trying to fix sys_time_usleep for stm32, still doesn't work, maybe is optimized out?

This commit is contained in:
Felix Ruess
2012-03-06 23:29:02 +01:00
parent f05af383db
commit d1d2676c7c
@@ -57,7 +57,7 @@ extern void sys_tick_irq_handler(void);
/** Busy wait, in microseconds */
// FIXME: directly use the SysTick->VAL here
static inline void sys_time_usleep(uint32_t us) {
uint32_t end = GET_CUR_TIME_USEC() + CPU_TICKS_OF_USEC(us);
uint32_t end = GET_CUR_TIME_USEC() + us;
while ((uint32_t)GET_CUR_TIME_USEC() < end);
}