1 /******************************************************************************
\r
2 * File Name : trace.h
\r
4 * Device(s) : Renesas
\r
5 * Tool-Chain : Renesas SH2A V9+
\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
15 /******************************************************************************
\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
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
41 #ifndef TRACE_H_INCLUDED
\r
42 #define TRACE_H_INCLUDED
\r
44 /******************************************************************************
\r
46 ******************************************************************************/
\r
50 /******************************************************************************
\r
52 ******************************************************************************/
\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
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
66 /******************************************************************************
\r
68 ******************************************************************************/
\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
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
91 ******************************************************************************/
\r
92 #ifdef _TRACE_ON_ /* Trace ON */
\r
93 extern void dbgPrintBuffer(PBYTE pbyBuffer, size_t stLength);
\r
100 #endif /* TRACE_H_INCLUDED */
\r
102 /******************************************************************************
\r
104 ******************************************************************************/