141 #define HiByte(a) (TUint8)((a)>>8) |
141 #define HiByte(a) (TUint8)((a)>>8) |
142 #define LoByte(a) (TUint8)((a)&0xFF) |
142 #define LoByte(a) (TUint8)((a)&0xFF) |
143 |
143 |
144 #define TUSB_PRINT(string) \ |
144 #define TUSB_PRINT(string) \ |
145 do { \ |
145 do { \ |
146 iConsole->Printf(_L(string)); \ |
146 if (iConsole) \ |
147 iConsole->Printf(_L("\n")); \ |
147 { \ |
|
148 iConsole->Printf(_L(string)); \ |
|
149 iConsole->Printf(_L("\n")); \ |
|
150 } \ |
148 RDebug::Print(_L(string)); \ |
151 RDebug::Print(_L(string)); \ |
149 } while (0) |
152 } while (0) |
150 |
153 |
151 #define TUSB_PRINT1(string, a) \ |
154 #define TUSB_PRINT1(string, a) \ |
152 do { \ |
155 do { \ |
153 iConsole->Printf(_L(string), (a)); \ |
156 if (iConsole) \ |
154 iConsole->Printf(_L("\n")); \ |
157 { \ |
|
158 iConsole->Printf(_L(string), (a)); \ |
|
159 iConsole->Printf(_L("\n")); \ |
|
160 } \ |
155 RDebug::Print(_L(string), (a)); \ |
161 RDebug::Print(_L(string), (a)); \ |
156 } while (0) |
162 } while (0) |
157 |
163 |
158 #define TUSB_PRINT2(string, a, b) \ |
164 #define TUSB_PRINT2(string, a, b) \ |
159 do { \ |
165 do { \ |
160 iConsole->Printf(_L(string), (a), (b)); \ |
166 if (iConsole) \ |
161 iConsole->Printf(_L("\n")); \ |
167 { \ |
|
168 iConsole->Printf(_L(string), (a), (b)); \ |
|
169 iConsole->Printf(_L("\n")); \ |
|
170 } \ |
162 RDebug::Print(_L(string), (a), (b)); \ |
171 RDebug::Print(_L(string), (a), (b)); \ |
163 } while (0) |
172 } while (0) |
164 |
173 |
165 #define TUSB_PRINT3(string, a, b, c) \ |
174 #define TUSB_PRINT3(string, a, b, c) \ |
166 do { \ |
175 do { \ |
167 iConsole->Printf(_L(string), (a), (b), (c)); \ |
176 if (iConsole) \ |
168 iConsole->Printf(_L("\n")); \ |
177 { \ |
|
178 iConsole->Printf(_L(string), (a), (b), (c)); \ |
|
179 iConsole->Printf(_L("\n")); \ |
|
180 } \ |
169 RDebug::Print(_L(string), (a), (b), (c)); \ |
181 RDebug::Print(_L(string), (a), (b), (c)); \ |
170 } while (0) |
182 } while (0) |
171 |
183 |
172 #define TUSB_PRINT4(string, a, b, c, d) \ |
184 #define TUSB_PRINT4(string, a, b, c, d) \ |
173 do { \ |
185 do { \ |
174 iConsole->Printf(_L(string), (a), (b), (c), (d)); \ |
186 if (iConsole) \ |
175 iConsole->Printf(_L("\n")); \ |
187 { \ |
|
188 iConsole->Printf(_L(string), (a), (b), (c), (d)); \ |
|
189 iConsole->Printf(_L("\n")); \ |
|
190 } \ |
176 RDebug::Print(_L(string), (a), (b), (c), (d)); \ |
191 RDebug::Print(_L(string), (a), (b), (c), (d)); \ |
177 } while (0) |
192 } while (0) |
178 |
193 |
179 #define TUSB_PRINT5(string, a, b, c, d, e) \ |
194 #define TUSB_PRINT5(string, a, b, c, d, e) \ |
180 do { \ |
195 do { \ |
181 iConsole->Printf(_L(string), (a), (b), (c), (d), (e)); \ |
196 if (iConsole) \ |
182 iConsole->Printf(_L("\n")); \ |
197 { \ |
|
198 iConsole->Printf(_L(string), (a), (b), (c), (d), (e)); \ |
|
199 iConsole->Printf(_L("\n")); \ |
|
200 } \ |
183 RDebug::Print(_L(string), (a), (b), (c), (d), (e)); \ |
201 RDebug::Print(_L(string), (a), (b), (c), (d), (e)); \ |
184 } while (0) |
202 } while (0) |
185 |
203 |
186 #define TUSB_PRINT6(string, a, b, c, d, e, f) \ |
204 #define TUSB_PRINT6(string, a, b, c, d, e, f) \ |
187 do { \ |
205 do { \ |
188 iConsole->Printf(_L(string), (a), (b), (c), (d), (e), (f)); \ |
206 if (iConsole) \ |
189 iConsole->Printf(_L("\n")); \ |
207 { \ |
|
208 iConsole->Printf(_L(string), (a), (b), (c), (d), (e), (f)); \ |
|
209 iConsole->Printf(_L("\n")); \ |
|
210 } \ |
190 RDebug::Print(_L(string), (a), (b), (c), (d), (e), (f)); \ |
211 RDebug::Print(_L(string), (a), (b), (c), (d), (e), (f)); \ |
191 } while (0) |
212 } while (0) |
192 |
213 |
193 #define TUSB_VERBOSE_PRINT(string) \ |
214 #define TUSB_VERBOSE_PRINT(string) \ |
194 do { \ |
215 do { \ |