1 /**
2   ******************************************************************************
3   * @file    stm32_assert.h
4   * @brief   STM32 assert file.
5   ******************************************************************************
6   * @attention
7   *
8   * <h2><center>&copy; Copyright (c) 2021 STMicroelectronics.
9   * All rights reserved.</center></h2>
10   *
11   * This software component is licensed by ST under BSD 3-Clause license,
12   * the "License"; You may not use this file except in compliance with the
13   * License. You may obtain a copy of the License at:
14   *                        opensource.org/licenses/BSD-3-Clause
15   *
16   ******************************************************************************
17   */
18 
19 /* Define to prevent recursive inclusion -------------------------------------*/
20 #ifndef __STM32_ASSERT_H
21 #define __STM32_ASSERT_H
22 
23 #ifdef __cplusplus
24  extern "C" {
25 #endif
26 
27 /* Exported types ------------------------------------------------------------*/
28 /* Exported constants --------------------------------------------------------*/
29 /* Includes ------------------------------------------------------------------*/
30 /* Exported macro ------------------------------------------------------------*/
31 #ifdef  USE_FULL_ASSERT
32 /**
33   * @brief  The assert_param macro is used for function's parameters check.
34   * @param  expr: If expr is false, it calls assert_failed function
35   *         which reports the name of the source file and the source
36   *         line number of the call that failed.
37   *         If expr is true, it returns no value.
38   * @retval None
39   */
40  #define assert_param(expr) ((expr) ? (void)0U : assert_failed((uint8_t *)__FILE__, __LINE__))
41 /* Exported functions ------------------------------------------------------- */
42   void assert_failed(uint8_t* file, uint32_t line);
43 #else
44   #define assert_param(expr) ((void)0U)
45 #endif /* USE_FULL_ASSERT */
46 
47 #ifdef __cplusplus
48 }
49 #endif
50 
51 #endif /* __STM32_ASSERT_H */
52 
53 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
54