]>
Commit | Line | Data |
---|---|---|
913cb9dc | 1 | /** @file\r |
2 | \r | |
3 | Copyright (c) 2007, Intel Corporation\r | |
4 | All rights reserved. This program and the accompanying materials\r | |
5 | are licensed and made available under the terms and conditions of the BSD License\r | |
6 | which accompanies this distribution. The full text of the license may be found at\r | |
7 | http://opensource.org/licenses/bsd-license.php\r | |
8 | \r | |
9 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r | |
10 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r | |
11 | \r | |
12 | Module Name:\r | |
13 | \r | |
14 | EhciDebug.h\r | |
15 | \r | |
16 | Abstract:\r | |
17 | \r | |
18 | This file contains the definination for host controller debug support routines\r | |
19 | \r | |
20 | Revision History\r | |
21 | \r | |
22 | **/\r | |
23 | \r | |
24 | #ifndef _EFI_EHCI_DEBUG_H_\r | |
25 | #define _EFI_EHCI_DEBUG_H_\r | |
26 | \r | |
27 | \r | |
28 | enum {\r | |
29 | USB_DEBUG_FORCE_OUTPUT = (UINTN)(1 << 0),\r | |
30 | \r | |
31 | EHC_DEBUG_QH = (UINTN)(1 << 8),\r | |
32 | EHC_DEBUG_QTD = (UINTN)(1 << 9),\r | |
33 | EHC_DEBUG_BUF = (UINTN)(1 << 10),\r | |
34 | };\r | |
35 | \r | |
36 | \r | |
37 | /**\r | |
38 | EHCI's debug output function. It determines whether\r | |
39 | to output by the mask and level\r | |
40 | \r | |
41 | @param Level The output level\r | |
42 | @param Format The format parameters to the print\r | |
43 | @param ... The variable length parameters after format\r | |
44 | \r | |
45 | @return None\r | |
46 | \r | |
47 | **/\r | |
48 | VOID\r | |
49 | EhciDebugPrint (\r | |
50 | IN UINTN Level,\r | |
51 | IN CHAR8 *Format,\r | |
52 | ...\r | |
53 | )\r | |
54 | ;\r | |
55 | \r | |
56 | \r | |
57 | /**\r | |
58 | EHCI's debug output function. It determines whether\r | |
59 | to output by the mask and level\r | |
60 | \r | |
61 | @param Format The format parameters to the print\r | |
62 | @param ... The variable length parameters after format\r | |
63 | \r | |
64 | @return None\r | |
65 | \r | |
66 | **/\r | |
67 | VOID\r | |
68 | EhcDebug (\r | |
69 | IN CHAR8 *Format,\r | |
70 | ...\r | |
71 | )\r | |
72 | ;\r | |
73 | \r | |
74 | \r | |
75 | \r | |
76 | /**\r | |
77 | EHCI's error output function. It determines whether\r | |
78 | to output by the mask and level\r | |
79 | \r | |
80 | @param Format The format parameters to the print\r | |
81 | @param ... The variable length parameters after format\r | |
82 | \r | |
83 | @return None\r | |
84 | \r | |
85 | **/\r | |
86 | VOID\r | |
87 | EhcError (\r | |
88 | IN CHAR8 *Format,\r | |
89 | ...\r | |
90 | )\r | |
91 | ;\r | |
92 | \r | |
93 | \r | |
94 | \r | |
95 | /**\r | |
96 | Dump the fields of a QTD\r | |
97 | \r | |
98 | @param Qtd The QTD to dump\r | |
99 | @param Msg The message to print before the dump\r | |
100 | \r | |
101 | @return None\r | |
102 | \r | |
103 | **/\r | |
104 | VOID\r | |
105 | EhcDumpQtd (\r | |
106 | IN EHC_QTD *Qtd,\r | |
107 | IN UINT8 *Msg\r | |
108 | )\r | |
109 | ;\r | |
110 | \r | |
111 | \r | |
112 | \r | |
113 | /**\r | |
114 | Dump the queue head\r | |
115 | \r | |
116 | @param Qh The queue head to dump\r | |
117 | @param Msg The message to print before the dump\r | |
118 | @param DumpBuf Whether to dump the memory buffer of the associated QTD\r | |
119 | \r | |
120 | @return None\r | |
121 | \r | |
122 | **/\r | |
123 | VOID\r | |
124 | EhcDumpQh (\r | |
125 | IN EHC_QH *Qh,\r | |
126 | IN UINT8 *Msg,\r | |
127 | IN BOOLEAN DumpBuf\r | |
128 | )\r | |
129 | ;\r | |
130 | \r | |
131 | \r | |
132 | \r | |
133 | /**\r | |
134 | Dump the buffer in the form of hex\r | |
135 | \r | |
136 | @param Buf The buffer to dump\r | |
137 | @param Len The length of buffer\r | |
138 | \r | |
139 | @return None\r | |
140 | \r | |
141 | **/\r | |
142 | VOID\r | |
143 | EhcDumpBuf (\r | |
144 | IN UINT8 *Buf,\r | |
145 | IN UINTN Len\r | |
146 | )\r | |
147 | ;\r | |
148 | \r | |
149 | #ifdef EFI_DEBUG\r | |
150 | #define EHC_DEBUG(arg) EhcDebug arg\r | |
151 | #define EHC_ERROR(arg) EhcError arg\r | |
152 | #define EHC_DUMP_QH(arg) EhcDumpQh arg\r | |
153 | #else\r | |
154 | #define EHC_DEBUG(arg)\r | |
155 | #define EHC_ERROR(arg)\r | |
156 | #define EHC_DUMP_QH(arg)\r | |
157 | #endif\r | |
158 | \r | |
159 | #endif\r |