add the fixed code
This commit is contained in:
parent
ecb1798be3
commit
1003a43d27
@ -66,3 +66,16 @@ void rt_hw_board_init(void)
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void rt_hw_us_delay(rt_uint32_t us)
|
||||||
|
{
|
||||||
|
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 * us);
|
||||||
|
}
|
||||||
|
@ -62,6 +62,7 @@ if PLATFORM == 'gcc':
|
|||||||
elif PLATFORM == 'armcc':
|
elif PLATFORM == 'armcc':
|
||||||
# toolchains
|
# toolchains
|
||||||
CC = 'armcc'
|
CC = 'armcc'
|
||||||
|
CXX = 'armcc'
|
||||||
AS = 'armasm'
|
AS = 'armasm'
|
||||||
AR = 'armar'
|
AR = 'armar'
|
||||||
LINK = 'armlink'
|
LINK = 'armlink'
|
||||||
|
Loading…
x
Reference in New Issue
Block a user