2 ******************************************************************************
\r
3 * @file stm32_assert.h
\r
4 * @brief STM32 assert file.
\r
5 ******************************************************************************
\r
6 ** This notice applies to any and all portions of this file
\r
7 * that are not between comment pairs USER CODE BEGIN and
\r
8 * USER CODE END. Other portions of this file, whether
\r
9 * inserted by the user or by software development tools
\r
10 * are owned by their respective copyright owners.
\r
12 * COPYRIGHT(c) 2018 STMicroelectronics
\r
14 * Redistribution and use in source and binary forms, with or without modification,
\r
15 * are permitted provided that the following conditions are met:
\r
16 * 1. Redistributions of source code must retain the above copyright notice,
\r
17 * this list of conditions and the following disclaimer.
\r
18 * 2. Redistributions in binary form must reproduce the above copyright notice,
\r
19 * this list of conditions and the following disclaimer in the documentation
\r
20 * and/or other materials provided with the distribution.
\r
21 * 3. Neither the name of STMicroelectronics nor the names of its contributors
\r
22 * may be used to endorse or promote products derived from this software
\r
23 * without specific prior written permission.
\r
25 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
\r
26 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
\r
27 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
\r
28 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
\r
29 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
\r
30 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
\r
31 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
\r
32 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
\r
33 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
\r
34 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
\r
36 ******************************************************************************
\r
39 /* Define to prevent recursive inclusion -------------------------------------*/
\r
40 #ifndef __STM32_ASSERT_H
\r
41 #define __STM32_ASSERT_H
\r
47 /* Exported types ------------------------------------------------------------*/
\r
48 /* Exported constants --------------------------------------------------------*/
\r
49 /* Includes ------------------------------------------------------------------*/
\r
50 /* Exported macro ------------------------------------------------------------*/
\r
51 #ifdef USE_FULL_ASSERT
\r
53 * @brief The assert_param macro is used for function's parameters check.
\r
54 * @param expr: If expr is false, it calls assert_failed function
\r
55 * which reports the name of the source file and the source
\r
56 * line number of the call that failed.
\r
57 * If expr is true, it returns no value.
\r
60 #define assert_param(expr) ((expr) ? (void)0U : assert_failed((uint8_t *)__FILE__, __LINE__))
\r
61 /* Exported functions ------------------------------------------------------- */
\r
62 void assert_failed(uint8_t* file, uint32_t line);
\r
64 #define assert_param(expr) ((void)0U)
\r
65 #endif /* USE_FULL_ASSERT */
\r
71 #endif /* __STM32_ASSERT_H */
\r
73 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
\r