From 816e3d876755f027f016042fd9e7c7461b92ad89 Mon Sep 17 00:00:00 2001 From: Pushpal Sidhu Date: Wed, 25 Apr 2018 13:42:42 -0700 Subject: [PATCH] arch: stm32l4: add HAL_Delay for hal library hooks Hook required for hal library to delay (in ms) Signed-off-by: Pushpal Sidhu --- arch/arm/soc/st_stm32/stm32l4/soc.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/arch/arm/soc/st_stm32/stm32l4/soc.c b/arch/arm/soc/st_stm32/stm32l4/soc.c index bb28dbc7e8a..fd996b44c5f 100644 --- a/arch/arm/soc/st_stm32/stm32l4/soc.c +++ b/arch/arm/soc/st_stm32/stm32l4/soc.c @@ -17,6 +17,18 @@ #include #include + +/** + * @brief This function provides minimum delay (in milliseconds) based + * on variable incremented. + * @param Delay: specifies the delay time length, in milliseconds. + * @return None + */ +void HAL_Delay(__IO uint32_t Delay) +{ + k_sleep(Delay); +} + /** * @brief This function configures the source of stm32cube time base. * Cube HAL expects a 1ms tick which matches with k_uptime_get_32.