1 /* USER CODE BEGIN Header */
2 /**
3   ******************************************************************************
4   * @file    stm32_assert.h
5   * @brief   STM32 assert file.
6   ******************************************************************************
7   * @attention
8   *
9   * Copyright (c) 2018 STMicroelectronics.
10   * All rights reserved.
11   *
12   * This software is licensed under terms that can be found in the LICENSE file
13   * in the root directory of this software component.
14   * If no LICENSE file comes with this software, it is provided AS-IS.
15   *
16   ******************************************************************************
17   */
18 /* USER CODE END Header */
19 
20 /* Define to prevent recursive inclusion -------------------------------------*/
21 #ifndef __STM32_ASSERT_H
22 #define __STM32_ASSERT_H
23 
24 #ifdef __cplusplus
25  extern "C" {
26 #endif
27 
28 /* Exported types ------------------------------------------------------------*/
29 /* Exported constants --------------------------------------------------------*/
30 /* Includes ------------------------------------------------------------------*/
31 /* Exported macro ------------------------------------------------------------*/
32 #ifdef  USE_FULL_ASSERT
33 /**
34   * @brief  The assert_param macro is used for function's parameters check.
35   * @param  expr: If expr is false, it calls assert_failed function
36   *         which reports the name of the source file and the source
37   *         line number of the call that failed.
38   *         If expr is true, it returns no value.
39   * @retval None
40   */
41  #define assert_param(expr) ((expr) ? (void)0U : assert_failed((uint8_t *)__FILE__, __LINE__))
42 /* Exported functions ------------------------------------------------------- */
43   void assert_failed(uint8_t* file, uint32_t line);
44 #else
45   #define assert_param(expr) ((void)0U)
46 #endif /* USE_FULL_ASSERT */
47 
48 #ifdef __cplusplus
49 }
50 #endif
51 
52 #endif /* __STM32_ASSERT_H */
53 
54