forked from xuos/xiuos
xiuos\APP_Framework\Framework\connection\lora:
1.test function has been modified
This commit is contained in:
parent
83112073a9
commit
c69397a2b7
|
@ -1091,7 +1091,15 @@ void rt_hw_board_init()
|
||||||
|
|
||||||
void rt_hw_us_delay(rt_uint32_t usec)
|
void rt_hw_us_delay(rt_uint32_t usec)
|
||||||
{
|
{
|
||||||
;
|
rt_uint32_t start, now, delta, reload, us_tick;
|
||||||
|
start = SysTick->VAL;
|
||||||
|
reload = SysTick->LOAD;
|
||||||
|
us_tick = SystemCoreClock / 1000000UL;
|
||||||
|
do {
|
||||||
|
now = SysTick->VAL;
|
||||||
|
delta = start > now ? start - now : reload + start - now;
|
||||||
|
} while(delta < us_tick * usec);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static int reboot(void)
|
static int reboot(void)
|
||||||
|
|
Loading…
Reference in New Issue