]> git.sur5r.net Git - freertos/blob - Demo/CORTEX_LM3S102_GCC/hw_include/debug.h
Start to re-arrange files to include FreeRTOS+ in main download.
[freertos] / Demo / CORTEX_LM3S102_GCC / hw_include / debug.h
1 //*****************************************************************************\r
2 //\r
3 // debug.h - Macros for assisting debug of the driver library.\r
4 //\r
5 // Copyright (c) 2006 Luminary Micro, Inc.  All rights reserved.\r
6 //\r
7 // Software License Agreement\r
8 //\r
9 // Luminary Micro, Inc. (LMI) is supplying this software for use solely and\r
10 // exclusively on LMI's Stellaris Family of microcontroller products.\r
11 //\r
12 // The software is owned by LMI and/or its suppliers, and is protected under\r
13 // applicable copyright laws.  All rights are reserved.  Any use in violation\r
14 // of the foregoing restrictions may subject the user to criminal sanctions\r
15 // under applicable laws, as well as to civil liability for the breach of the\r
16 // terms and conditions of this license.\r
17 //\r
18 // THIS SOFTWARE IS PROVIDED "AS IS".  NO WARRANTIES, WHETHER EXPRESS, IMPLIED\r
19 // OR STATUTORY, INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES OF\r
20 // MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE APPLY TO THIS SOFTWARE.\r
21 // LMI SHALL NOT, IN ANY CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR\r
22 // CONSEQUENTIAL DAMAGES, FOR ANY REASON WHATSOEVER.\r
23 //\r
24 // This is part of revision 523 of the Stellaris Driver Library.\r
25 //\r
26 //*****************************************************************************\r
27 \r
28 #ifndef __DEBUG_H__\r
29 #define __DEBUG_H__\r
30 \r
31 //*****************************************************************************\r
32 //\r
33 // Prototype for the function that is called when an invalid argument is passed\r
34 // to an API.  This is only used when doing a DEBUG build.\r
35 //\r
36 //*****************************************************************************\r
37 extern void __error__(char *pcFilename, unsigned long ulLine);\r
38 \r
39 //*****************************************************************************\r
40 //\r
41 // The ASSERT macro, which does the actual assertion checking.  Typically, this\r
42 // will be for procedure arguments.\r
43 //\r
44 //*****************************************************************************\r
45 #ifdef DEBUG\r
46 #define ASSERT(expr) {                                      \\r
47                          if(!(expr))                        \\r
48                          {                                  \\r
49                              __error__(__FILE__, __LINE__); \\r
50                          }                                  \\r
51                      }\r
52 #else\r
53 #define ASSERT(expr)\r
54 #endif\r
55 \r
56 #endif // __DEBUG_H__\r