Back to home page

LXR

 
 

    


File indexing completed on 2025-05-11 08:23:10

0001 /**
0002   ******************************************************************************
0003   * @file    stm32_assert.h
0004   * @author  MCD Application Team
0005   * @brief   STM32 assert template file.
0006   *          This file should be copied to the application folder and renamed
0007   *          to stm32_assert.h.
0008   ******************************************************************************
0009   * @attention
0010   *
0011   * Copyright (c) 2017 STMicroelectronics.
0012   * All rights reserved.
0013   *
0014   * This software is licensed under terms that can be found in the LICENSE file
0015   * in the root directory of this software component.
0016   * If no LICENSE file comes with this software, it is provided AS-IS.
0017   *
0018   ******************************************************************************
0019   */
0020 
0021 /* Define to prevent recursive inclusion -------------------------------------*/
0022 #ifndef __STM32_ASSERT_H
0023 #define __STM32_ASSERT_H
0024 
0025 #ifdef __cplusplus
0026  extern "C" {
0027 #endif
0028 
0029 /* Exported types ------------------------------------------------------------*/
0030 /* Exported constants --------------------------------------------------------*/
0031 /* Includes ------------------------------------------------------------------*/
0032 /* Exported macro ------------------------------------------------------------*/
0033 #ifdef  USE_FULL_ASSERT
0034 /**
0035   * @brief  The assert_param macro is used for function's parameters check.
0036   * @param  expr If expr is false, it calls assert_failed function
0037   *         which reports the name of the source file and the source
0038   *         line number of the call that failed.
0039   *         If expr is true, it returns no value.
0040   * @retval None
0041   */
0042   #define assert_param(expr) ((expr) ? (void)0U : assert_failed((uint8_t *)__FILE__, __LINE__))
0043 /* Exported functions ------------------------------------------------------- */
0044   void assert_failed(uint8_t* file, uint32_t line);
0045 #else
0046   #define assert_param(expr) ((void)0U)
0047 #endif /* USE_FULL_ASSERT */
0048 
0049 #ifdef __cplusplus
0050 }
0051 #endif
0052 
0053 #endif /* __STM32_ASSERT_H */
0054 
0055 
0056