PDK API Guide for AM64x
DebugP.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2015-2020, Texas Instruments Incorporated
3  * All rights reserved.
4  *
5  * Redistribution and use in source and binary forms, with or without
6  * modification, are permitted provided that the following conditions
7  * are met:
8  *
9  * * Redistributions of source code must retain the above copyright
10  * notice, this list of conditions and the following disclaimer.
11  *
12  * * Redistributions in binary form must reproduce the above copyright
13  * notice, this list of conditions and the following disclaimer in the
14  * documentation and/or other materials provided with the distribution.
15  *
16  * * Neither the name of Texas Instruments Incorporated nor the names of
17  * its contributors may be used to endorse or promote products derived
18  * from this software without specific prior written permission.
19  *
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31  */
67 #ifndef ti_drivers_ports_DebugP__include
68 #define ti_drivers_ports_DebugP__include
69 
70 #ifdef __cplusplus
71 extern "C" {
72 #endif
73 
74 #include <stdint.h>
75 #include <stdbool.h>
76 #include <stddef.h>
77 
78 #define DebugP_ASSERT_ENABLED 1
79 #define DebugP_LOG_ENABLED 1
80 
88 #ifndef DebugP_ASSERT_ENABLED
89 #define DebugP_ASSERT_ENABLED 0
90 #endif
91 
98 #ifndef DebugP_LOG_ENABLED
99 #define DebugP_LOG_ENABLED 0
100 #endif
101 
116 #if DebugP_ASSERT_ENABLED
117 extern void Osal_DebugP_assert_fcn(bool expression, const char *file, int32_t line);
118 #define DebugP_assert(expression) (Osal_DebugP_assert_fcn(expression, \
119  __FILE__, __LINE__))
120 #else
121 #define DebugP_assert(expression)
122 #endif
123 
135 #if DebugP_LOG_ENABLED
136 extern void DebugP_log0(const char *format);
137 #else
138 #define DebugP_log0(format)
139 #endif
140 
151 #if DebugP_LOG_ENABLED
152 extern void DebugP_log1(const char *format, uintptr_t p1);
153 #else
154 #define DebugP_log1(format, p1)
155 #endif
156 
169 #if DebugP_LOG_ENABLED
170 extern void DebugP_log2(const char *format, uintptr_t p1, uintptr_t p2);
171 #else
172 #define DebugP_log2(format, p1, p2)
173 #endif
174 
187 #if DebugP_LOG_ENABLED
188 extern void DebugP_log3(const char *format, uintptr_t p1, uintptr_t p2, uintptr_t p3);
189 #else
190 #define DebugP_log3(format, p1, p2, p3)
191 #endif
192 
206 #if DebugP_LOG_ENABLED
207 extern void DebugP_log4(const char *format, uintptr_t p1, uintptr_t p2, uintptr_t p3, uintptr_t p4);
208 #else
209 #define DebugP_log4(format, p1, p2, p3, p4)
210 #endif
211 
212 #ifdef __cplusplus
213 }
214 #endif
215 
216 #endif /* ti_drivers_ports_DebugP__include */
217 /* @} */
void DebugP_log1(const char *format, uintptr_t p1)
Debug log function with 1 parameters.
void DebugP_log3(const char *format, uintptr_t p1, uintptr_t p2, uintptr_t p3)
Debug log function with 3 parameters.
void DebugP_log2(const char *format, uintptr_t p1, uintptr_t p2)
Debug log function with 2 parameters.
void DebugP_log0(const char *format)
Debug log function with 0 parameters.
void Osal_DebugP_assert_fcn(bool expression, const char *file, int32_t line)
Assert Enabled.
void DebugP_log4(const char *format, uintptr_t p1, uintptr_t p2, uintptr_t p3, uintptr_t p4)
Debug log function with 4 parameters.