]> git.sur5r.net Git - freertos/blob - Demo/SuperH_SH7216_Renesas/RTOSDemo/RenesasCode/trace.h
Start to re-arrange files to include FreeRTOS+ in main download.
[freertos] / Demo / SuperH_SH7216_Renesas / RTOSDemo / RenesasCode / trace.h
1 /******************************************************************************\r
2 * File Name    : trace.h\r
3 * Version      : 1.0\r
4 * Device(s)    : Renesas\r
5 * Tool-Chain   : Renesas SH2A V9+\r
6 * OS           : None\r
7 * H/W Platform : SH2A\r
8 * Description  : Debug formatted output routine\r
9 *                TRACE print function enabled with define _TRACE_ON_\r
10 *******************************************************************************\r
11 * History      : DD.MM.YYYY Ver. Description\r
12 *              : 01.08.2009 1.00 MAB First Release\r
13 ******************************************************************************/\r
14 \r
15 /******************************************************************************\r
16 * DISCLAIMER\r
17 * This software is supplied by Renesas Technology Corp. and is only\r
18 * intended for use with Renesas products. No other uses are authorized.\r
19 * This software is owned by Renesas Technology Corp. and is protected under\r
20 * all applicable laws, including copyright laws.\r
21 * THIS SOFTWARE IS PROVIDED "AS IS" AND RENESAS MAKES NO WARRANTIES\r
22 * REGARDING THIS SOFTWARE, WHETHER EXPRESS, IMPLIED OR STATUTORY,\r
23 * INCLUDING BUT NOT LIMITED TO WARRANTIES OF MERCHANTABILITY, FITNESS FOR A\r
24 * PARTICULAR PURPOSE AND NON-INFRINGEMENT. ALL SUCH WARRANTIES ARE EXPRESSLY\r
25 * DISCLAIMED.\r
26 * TO THE MAXIMUM EXTENT PERMITTED NOT PROHIBITED BY LAW, NEITHER RENESAS\r
27 * TECHNOLOGY CORP. NOR ANY OF ITS AFFILIATED COMPANIES SHALL BE LIABLE\r
28 * FOR ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES\r
29 * FOR ANY REASON RELATED TO THE THIS SOFTWARE, EVEN IF RENESAS OR ITS\r
30 * AFFILIATES HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.\r
31 * Renesas reserves the right, without notice, to make changes to this\r
32 * software and to discontinue the availability of this software.\r
33 * By using this software, you agree to the additional terms and\r
34 * conditions found by accessing the following link:\r
35 * http://www.renesas.com/disclaimer\r
36 ******************************************************************************/\r
37 /* Copyright (C) 2008. Renesas Technology Corp.,       All Rights Reserved.  */\r
38 /* Copyright (C) 2009. Renesas Technology Europe Ltd., All Rights Reserved.  */\r
39 /*****************************************************************************/\r
40 \r
41 #ifndef TRACE_H_INCLUDED\r
42 #define TRACE_H_INCLUDED\r
43 \r
44 /******************************************************************************\r
45 User Includes\r
46 ******************************************************************************/\r
47 \r
48 #include "types.h"\r
49 \r
50 /******************************************************************************\r
51 Function Macros\r
52 ******************************************************************************/\r
53 \r
54 /* Some function macros for TRACE output\r
55    NOTE: debugging TRACE statements require double braces\r
56    so the debug strings can be removed from the output load module:\r
57    TRACE(("My Variable = %u\r\n", uiMyVariable));\r
58    See ANSI C formatted output for more detail on the format specifiers */\r
59 \r
60 #ifdef _TRACE_ON_                   /* Trace ON */\r
61 #define TRACE(_x_)                  Trace _x_\r
62 #else                               /* _NO_TRACE_ON_ */\r
63 #define TRACE(_x_)                  /* TRACE REMOVED */\r
64 #endif                              /* _TRACE_ON_ */\r
65 \r
66 /******************************************************************************\r
67 Public Functions\r
68 ******************************************************************************/\r
69 \r
70 #ifdef __cplusplus\r
71 extern "C" {\r
72 #endif\r
73 \r
74 /******************************************************************************\r
75 Function Name: Trace\r
76 Description:   Function to perform a formatted print output for debugging\r
77 Parameters:    IN  pszFormat - Pointer to a null terminated format string\r
78                I/O ... - The parameters\r
79 Return value:  The number of chars output\r
80 ******************************************************************************/\r
81 #ifdef _TRACE_ON_                   /* Trace ON */\r
82 extern  int Trace(const char *pszFormat, ...);\r
83 #endif\r
84 \r
85 /******************************************************************************\r
86 Function Name: dbgPrintBuffer\r
87 Description:   Function to print a data buffer in hex format\r
88 Parameters:    IN  pbyBuffer - Pointer to the buffer\r
89                IN  stLength - The length of the buffer\r
90 Return value:  none\r
91 ******************************************************************************/\r
92 #ifdef _TRACE_ON_                   /* Trace ON */\r
93 extern  void dbgPrintBuffer(PBYTE pbyBuffer, size_t stLength);\r
94 #endif\r
95 \r
96 #ifdef __cplusplus\r
97 }\r
98 #endif\r
99 \r
100 #endif /* TRACE_H_INCLUDED */\r
101 \r
102 /******************************************************************************\r
103 End  Of File\r
104 ******************************************************************************/