1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-14 03:50:02 +03:00

Merge branch 'master' into betaflight

Conflicts:
	src/main/drivers/system.c
	src/main/rx/rx.h
This commit is contained in:
borisbstyle 2015-09-07 10:08:34 +02:00
commit febee3fb90
26 changed files with 812 additions and 320 deletions

View file

@ -99,6 +99,10 @@ uint32_t micros(void)
do {
ms = sysTickUptime;
cycle_cnt = SysTick->VAL;
/*
* If the SysTick timer expired during the previous instruction, we need to give it a little time for that
* interrupt to be delivered before we can recheck sysTickUptime:
*/
asm volatile("\tnop\n");
} while (ms != sysTickUptime);
return (ms * 1000) + (usTicks * 1000 - cycle_cnt) / usTicks;