Skip to content

Commit a6cf5d9

Browse files
author
Gang He
committed
module: hal_sifli: Overwrite SiFli HAL delay function with k_sleep
SiFli HAL is using HAL_Delay_us to delay for certain microseconds. This is a weak function. I overwrites this function with Zephyr k_sleep. Signed-off-by: Gang He <[email protected]>
1 parent 1cbab2f commit a6cf5d9

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

modules/hal_sifli/hal.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@
44
*/
55

66
#include <stdint.h>
7+
#include <zephyr/kernel.h>
78

89
/* System clock (48MHz by RC48 at boot) */
910
uint32_t SystemCoreClock = 48000000UL;
11+
12+
void HAL_Delay_us(uint32_t us)
13+
{
14+
k_sleep(K_USEC(us));
15+
}

0 commit comments

Comments
 (0)