Rev 56 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 56 | Rev 77 | ||
---|---|---|---|
Line 1... | Line 1... | ||
1 | /** |
1 | /** |
2 | ****************************************************************************** |
2 | ****************************************************************************** |
3 | * @file stm32_assert.h |
3 | * @file stm32_assert.h |
4 | * @author MCD Application Team |
4 | * @author MCD Application Team |
5 | * @brief STM32 assert template file. |
5 | * @brief STM32 assert template file. |
6 | * This file should be copied to the application folder and renamed |
6 | * This file should be copied to the application folder and renamed |
7 | * to stm32_assert.h. |
7 | * to stm32_assert.h. |
8 | ****************************************************************************** |
8 | ****************************************************************************** |
9 | * @attention |
9 | * @attention |
10 | * |
10 | * |
11 | * <h2><center>© Copyright (c) 2017 STMicroelectronics. |
11 | * Copyright (c) 2017 STMicroelectronics. |
12 | * All rights reserved.</center></h2> |
12 | * All rights reserved. |
13 | * |
13 | * |
14 | * This software component is licensed by ST under BSD 3-Clause license, |
14 | * This software is licensed under terms that can be found in the LICENSE file |
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: |
15 | * in the root directory of this software component. |
17 | * opensource.org/licenses/BSD-3-Clause |
16 | * If no LICENSE file comes with this software, it is provided AS-IS. |
18 | * |
17 | * |
19 | ****************************************************************************** |
18 | ****************************************************************************** |
20 | */ |
19 | */ |
21 | 20 | ||
22 | /* Define to prevent recursive inclusion -------------------------------------*/ |
21 | /* Define to prevent recursive inclusion -------------------------------------*/ |
23 | #ifndef __STM32_ASSERT_H |
22 | #ifndef __STM32_ASSERT_H |
24 | #define __STM32_ASSERT_H |
23 | #define __STM32_ASSERT_H |
25 | 24 | ||
26 | #ifdef __cplusplus |
25 | #ifdef __cplusplus |
27 | extern "C" { |
26 | extern "C" { |
28 | #endif |
27 | #endif |
29 | 28 | ||
30 | /* Exported types ------------------------------------------------------------*/ |
29 | /* Exported types ------------------------------------------------------------*/ |
31 | /* Exported constants --------------------------------------------------------*/ |
30 | /* Exported constants --------------------------------------------------------*/ |
32 | /* Includes ------------------------------------------------------------------*/ |
31 | /* Includes ------------------------------------------------------------------*/ |
33 | /* Exported macro ------------------------------------------------------------*/ |
32 | /* Exported macro ------------------------------------------------------------*/ |
34 | #ifdef USE_FULL_ASSERT |
33 | #ifdef USE_FULL_ASSERT |
35 | /** |
34 | /** |
36 | * @brief The assert_param macro is used for function's parameters check. |
35 | * @brief The assert_param macro is used for function's parameters check. |
37 | * @param expr If expr is false, it calls assert_failed function |
36 | * @param expr If expr is false, it calls assert_failed function |
38 | * which reports the name of the source file and the source |
37 | * which reports the name of the source file and the source |
39 | * line number of the call that failed. |
38 | * line number of the call that failed. |
40 | * If expr is true, it returns no value. |
39 | * If expr is true, it returns no value. |
41 | * @retval None |
40 | * @retval None |
42 | */ |
41 | */ |
43 | #define assert_param(expr) ((expr) ? (void)0U : assert_failed((uint8_t *)__FILE__, __LINE__)) |
42 | #define assert_param(expr) ((expr) ? (void)0U : assert_failed((uint8_t *)__FILE__, __LINE__)) |
44 | /* Exported functions ------------------------------------------------------- */ |
43 | /* Exported functions ------------------------------------------------------- */ |
45 | void assert_failed(uint8_t* file, uint32_t line); |
44 | void assert_failed(uint8_t* file, uint32_t line); |
46 | #else |
45 | #else |
47 | #define assert_param(expr) ((void)0U) |
46 | #define assert_param(expr) ((void)0U) |
48 | #endif /* USE_FULL_ASSERT */ |
47 | #endif /* USE_FULL_ASSERT */ |
49 | 48 | ||
50 | #ifdef __cplusplus |
49 | #ifdef __cplusplus |
51 | } |
50 | } |
52 | #endif |
51 | #endif |
53 | 52 | ||
54 | #endif /* __STM32_ASSERT_H */ |
53 | #endif /* __STM32_ASSERT_H */ |
55 | 54 | ||
56 | 55 | ||
57 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ |
- | |
- | 56 |