Merge pull request #11270 from haslinghuis/rename_attr
[betaflight.git] / lib / main / STM32H7 / Drivers / STM32H7xx_HAL_Driver / Inc / stm32_assert_template.h
blob4711b65d8f92aad7451e91ba385a3a1625ca737a
1 /**
2 ******************************************************************************
3 * @file stm32_assert.h
4 * @author MCD Application Team
5 * @brief STM32 assert template file.
6 * This file should be copied to the application folder and renamed
7 * to stm32_assert.h.
8 ******************************************************************************
9 * @attention
11 * <h2><center>&copy; Copyright (c) 2017 STMicroelectronics.
12 * All rights reserved.</center></h2>
14 * This software component is licensed by ST under BSD 3-Clause license,
15 * the "License"; You may not use this file except in compliance with the
16 * License. You may obtain a copy of the License at:
17 * opensource.org/licenses/BSD-3-Clause
19 ******************************************************************************
22 /* Define to prevent recursive inclusion -------------------------------------*/
23 #ifndef __STM32_ASSERT_H
24 #define __STM32_ASSERT_H
26 #ifdef __cplusplus
27 extern "C" {
28 #endif
30 /* Exported types ------------------------------------------------------------*/
31 /* Exported constants --------------------------------------------------------*/
32 /* Includes ------------------------------------------------------------------*/
33 /* Exported macro ------------------------------------------------------------*/
34 #ifdef USE_FULL_ASSERT
35 /**
36 * @brief The assert_param macro is used for function's parameters check.
37 * @param expr If expr is false, it calls assert_failed function
38 * which reports the name of the source file and the source
39 * line number of the call that failed.
40 * If expr is true, it returns no value.
41 * @retval None
43 #define assert_param(expr) ((expr) ? (void)0U : assert_failed((uint8_t *)__FILE__, __LINE__))
44 /* Exported functions ------------------------------------------------------- */
45 void assert_failed(uint8_t* file, uint32_t line);
46 #else
47 #define assert_param(expr) ((void)0U)
48 #endif /* USE_FULL_ASSERT */
50 #ifdef __cplusplus
52 #endif
54 #endif /* __STM32_ASSERT_H */
57 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/