Skip to content

Commit

Permalink
L1_HAL/utils: Fix compile error when USE_HAL_DRIVER is defined.
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
yn386 authored and dpgeorge committed Sep 23, 2022
1 parent f71b52e commit a9f8fee
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions STM32L1xx_HAL_Driver/Src/stm32l1xx_ll_utils.c
Expand Up @@ -24,8 +24,10 @@
#ifdef USE_FULL_ASSERT
#include "stm32_assert.h"
#else
#if !defined(USE_HAL_DRIVER)
#define assert_param(expr) ((void)0U)
#endif
#endif

/** @addtogroup STM32L1xx_LL_Driver
* @{
Expand Down

0 comments on commit a9f8fee

Please sign in to comment.