AM64x MCU+ SDK
10.00.00
cdn_print.h
Go to the documentation of this file.
1
/******************************************************************************
2
* Copyright (C) 2011-2018 Cadence Design Systems, Inc.
3
* All rights reserved worldwide
4
*
5
* The material contained herein is the proprietary and confidential
6
* information of Cadence or its licensors, and is supplied subject to, and may
7
* be used only by Cadence's customer in accordance with a previously executed
8
* license and maintenance agreement between Cadence and that customer.
9
*
10
******************************************************************************
11
* cdn_print.h
12
* Print debug logs
13
*
14
* This is the example implementation of DbgPrint used in debug build
15
******************************************************************************
16
*/
17
26
#ifdef __cplusplus
27
extern
"C"
28
{
29
#endif
30
31
#include "stdarg.h"
32
#include "stdio.h"
33
#include "stdlib.h"
34
#include "stddef.h"
35
#include "stdint.h"
36
#include <
usb/cdn/core_driver/common/include/cdn_log.h
>
37
45
#define USBSSP_DBG_CUSBD 0x00000010U
46
48
#define USBSSP_DBG_CUSBD_ISR 0x00000001U
49
51
#define DBG_DMA_BASIC_MSG 0x00000100U
52
54
#define DBG_DMA_VERBOSE_MSG 0x00000200U
55
57
#define DBG_DMA_ERR_MSG 0x00000400U
58
60
#define DBG_DMA_CHANNEL_USEGE_MSG 0x00001000U
61
67
inline
void
DbgPrint
(uint32_t module_id, uint32_t log_lvl,
const
char
*
str
, ...);
68
73
void
CUSBD_DbgMsgInit
(
void
);
74
84
void
DbgMsgSetLvl
(uint32_t log_lvl);
85
92
void
DbgMsgEnableModule
(uint32_t module_id);
93
99
void
DbgMsgDisableModule
(uint32_t module_id);
100
101
102
#ifdef DEBUG
103
104
#define DEFAULT_CDN_DBG_MODULE ( USBSSP_DBG_CUSBD | DBG_DMA_BASIC_MSG )
105
#define DEFAULT_CDN_LOG_LVL (DBG_FYI)
106
107
108
#else
109
110
#define DEFAULT_CDN_DBG_MODULE (0)
111
#define DEFAULT_CDN_LOG_LVL (0)
112
113
#endif
114
117
#ifdef __cplusplus
118
}
119
#endif
120
121
CUSBD_DbgMsgInit
void CUSBD_DbgMsgInit(void)
Initialize CUSBD Debug module with default parameters.
str
char str[32]
Definition:
tisci_core.h:1
DbgMsgEnableModule
void DbgMsgEnableModule(uint32_t module_id)
enable logs for given module
DbgMsgDisableModule
void DbgMsgDisableModule(uint32_t module_id)
disable logs for given module
cdn_log.h
DbgPrint
void DbgPrint(uint32_t module_id, uint32_t log_lvl, const char *str,...)
Printf function hook for cadence usb device driver.
DbgMsgSetLvl
void DbgMsgSetLvl(uint32_t log_lvl)
Sets debug verbosity level.
source
usb
cdn
include
cdn_print.h
generated by
1.8.20