iLLD_TC27xD  1.0
Ifx_Assert.h
Go to the documentation of this file.
1 /**
2  * \file Ifx_Assert.h
3  * \brief Assert functions.
4  * \ingroup library_srvsw_utilities_assert
5  *
6  * \version iLLD_1_0_0_11_0
7  * \copyright Copyright (c) 2013 Infineon Technologies AG. All rights reserved.
8  *
9  *
10  * IMPORTANT NOTICE
11  *
12  *
13  * Infineon Technologies AG (Infineon) is supplying this file for use
14  * exclusively with Infineon's microcontroller products. This file can be freely
15  * distributed within development tools that are supporting such microcontroller
16  * products.
17  *
18  * THIS SOFTWARE IS PROVIDED "AS IS". NO WARRANTIES, WHETHER EXPRESS, IMPLIED
19  * OR STATUTORY, INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES OF
20  * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE APPLY TO THIS SOFTWARE.
21  * INFINEON SHALL NOT, IN ANY CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL,
22  * OR CONSEQUENTIAL DAMAGES, FOR ANY REASON WHATSOEVER.
23  *
24  * \defgroup library_srvsw_utilities_assert Assertion
25  * This module implements assertion functions.
26  * \ingroup library_srvsw_utilities
27  *
28  */
29 
30 #ifndef IFX_ASSERT_H
31 #define IFX_ASSERT_H 1
32 
33 #include "Ifx_Cfg.h" /* Do not remove this include */
34 #include "Cpu/Std/Ifx_Types.h" /* Do not remove this include */
35 
36 /** \addtogroup library_srvsw_utilities_assert
37  * \{ */
38 
39 #define IFX_VERBOSE_LEVEL_OFF (0) /**< \brief Assertion level off, assertion is disabled */
40 #define IFX_VERBOSE_LEVEL_FAILURE (1) /**< \brief Assertion level failure, a debug instruction is inserted if enabled */
41 #define IFX_VERBOSE_LEVEL_ERROR (2) /**< \brief Assertion level error, a debug instruction is inserted if enabled */
42 #define IFX_VERBOSE_LEVEL_WARNING (3) /**< \brief Assertion level warning */
43 #define IFX_VERBOSE_LEVEL_INFO (4) /**< \brief Assertion level info */
44 #define IFX_VERBOSE_LEVEL_DEBUG (5) /**< \brief Assertion level debug */
45 
46 /** \brief Constant to be used to indicate not implemented feature */
47 #define IFX_ASSERT_FEATURE_NOT_IMPLEMENTED (FALSE)
48 /** \brief Feature is not available on the selected hardware */
49 #define IFX_ASSERT_FEATURE_NOT_AVAILABLE (FALSE)
50 
51 #ifndef IFX_ASSERT
52 # define IFX_ASSERT(level, expr) ((void)0)
53 #endif
54 
55 #ifndef IFX_VALIDATE
56 # define IFX_VALIDATE(level, expr) (expr)
57 #endif
58 
59 #ifdef IFX_CFG_ASSERT_INCLUDE
60 /** Configuration switch: IFX_CFG_ASSERT_INCLUDE
61  * This switch is used to enable user defined assertion implementation.
62  * A usage exmaple is given below:
63  *
64  * \code
65  * // File "Ifx_Cfg.h"
66  * #define IFX_CFG_ASSERT_INCLUDE "SysSe/Bsp/Assert.h"
67  * \endcode
68  */
69 #include IFX_CFG_ASSERT_INCLUDE
70 #endif
71 /** \} */
72 
73 #endif