Skip to content

Commit 8b2bb4e

Browse files
yn386dpgeorge
authored andcommitted
L1_HAL/utils: Fix compile error when USE_HAL_DRIVER is defined.
When USE_HAL_DRIVER is defined, assert_param is defined by stm32xx_hal_conf.h but stm32l1xx_ll_utils.c always define assert_param if USE_FULL_ASSERT is not defined. This change adds checking whether USE_HAL_DRIVER is defined.
1 parent 39695f4 commit 8b2bb4e

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

STM32L1xx_HAL_Driver/Src/stm32l1xx_ll_utils.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,10 @@
2424
#ifdef USE_FULL_ASSERT
2525
#include "stm32_assert.h"
2626
#else
27+
#if !defined(USE_HAL_DRIVER)
2728
#define assert_param(expr) ((void)0U)
2829
#endif
30+
#endif
2931

3032
/** @addtogroup STM32L1xx_LL_Driver
3133
* @{

0 commit comments

Comments
 (0)