diff options
| author | supperthomas <[email protected]> | 2021-03-06 22:09:19 +0800 |
|---|---|---|
| committer | supperthomas <[email protected]> | 2021-03-06 22:09:19 +0800 |
| commit | 1003a43d27408be0eb4ad02a95735bc00456d26b (patch) | |
| tree | 6b633b12b5b72119914deedb706540698083aa03 /bsp/maxim | |
| parent | ecb1798be371145fcb83a0ba7820ba41e6cdbb9e (diff) | |
add the fixed code
Diffstat (limited to 'bsp/maxim')
| -rw-r--r-- | bsp/maxim/MAX32660_EVSYS/board/board.c | 13 | ||||
| -rw-r--r-- | bsp/maxim/MAX32660_EVSYS/rtconfig.py | 1 |
2 files changed, 14 insertions, 0 deletions
diff --git a/bsp/maxim/MAX32660_EVSYS/board/board.c b/bsp/maxim/MAX32660_EVSYS/board/board.c index 5bc5a5f679..d34b786c98 100644 --- a/bsp/maxim/MAX32660_EVSYS/board/board.c +++ b/bsp/maxim/MAX32660_EVSYS/board/board.c @@ -66,3 +66,16 @@ void rt_hw_board_init(void) #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); +} diff --git a/bsp/maxim/MAX32660_EVSYS/rtconfig.py b/bsp/maxim/MAX32660_EVSYS/rtconfig.py index 70faf43ff9..48273268f4 100644 --- a/bsp/maxim/MAX32660_EVSYS/rtconfig.py +++ b/bsp/maxim/MAX32660_EVSYS/rtconfig.py @@ -62,6 +62,7 @@ if PLATFORM == 'gcc': elif PLATFORM == 'armcc': # toolchains CC = 'armcc' + CXX = 'armcc' AS = 'armasm' AR = 'armar' LINK = 'armlink' |
