mirror of
https://github.com/paparazzi/paparazzi.git
synced 2026-06-02 21:37:24 +08:00
trying to fix sys_time_usleep for stm32, still doesn't work, maybe is optimized out?
This commit is contained in:
@@ -57,7 +57,7 @@ extern void sys_tick_irq_handler(void);
|
|||||||
/** Busy wait, in microseconds */
|
/** Busy wait, in microseconds */
|
||||||
// FIXME: directly use the SysTick->VAL here
|
// FIXME: directly use the SysTick->VAL here
|
||||||
static inline void sys_time_usleep(uint32_t us) {
|
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);
|
while ((uint32_t)GET_CUR_TIME_USEC() < end);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user