kerneltest/e32test/usb/t_usb_device/include/general.h
changeset 259 57b9594f5772
parent 247 d8d70de2bd36
equal deleted inserted replaced
247:d8d70de2bd36 259:57b9594f5772
   146 			if (iConsole) \
   146 			if (iConsole) \
   147 			{			\
   147 			{			\
   148 		    iConsole->Printf(_L(string)); \
   148 		    iConsole->Printf(_L(string)); \
   149 		    iConsole->Printf(_L("\n")); \
   149 		    iConsole->Printf(_L("\n")); \
   150 			} \
   150 			} \
   151 		RDebug::Print(_L(string)); \
       
   152 		} while (0)
   151 		} while (0)
   153 
   152 
   154 #define TUSB_PRINT1(string, a) \
   153 #define TUSB_PRINT1(string, a) \
   155 		do { \
   154 		do { \
   156 		if (iConsole) \
   155 		if (iConsole) \
   157 			{			\
   156 			{			\
   158 			iConsole->Printf(_L(string), (a)); \
   157 			iConsole->Printf(_L(string), (a)); \
   159 			iConsole->Printf(_L("\n")); \
   158 			iConsole->Printf(_L("\n")); \
   160 			}	\
   159 			}	\
   161 		RDebug::Print(_L(string), (a)); \
       
   162 		} while (0)
   160 		} while (0)
   163 
   161 
   164 #define TUSB_PRINT2(string, a, b) \
   162 #define TUSB_PRINT2(string, a, b) \
   165 		do { \
   163 		do { \
   166 			if (iConsole) \
   164 			if (iConsole) \
   167 			{			\
   165 			{			\
   168 			iConsole->Printf(_L(string), (a), (b)); \
   166 			iConsole->Printf(_L(string), (a), (b)); \
   169 			iConsole->Printf(_L("\n")); \
   167 			iConsole->Printf(_L("\n")); \
   170 			}	\
   168 			}	\
   171 		RDebug::Print(_L(string), (a), (b)); \
       
   172 		} while (0)
   169 		} while (0)
   173 
   170 
   174 #define TUSB_PRINT3(string, a, b, c) \
   171 #define TUSB_PRINT3(string, a, b, c) \
   175 		do { \
   172 		do { \
   176 			if (iConsole) \
   173 			if (iConsole) \
   177 			{			\
   174 			{			\
   178 			iConsole->Printf(_L(string), (a), (b), (c)); \
   175 			iConsole->Printf(_L(string), (a), (b), (c)); \
   179 			iConsole->Printf(_L("\n")); \
   176 			iConsole->Printf(_L("\n")); \
   180 			}	\
   177 			}	\
   181 		RDebug::Print(_L(string), (a), (b), (c)); \
       
   182 		} while (0)
   178 		} while (0)
   183 
   179 
   184 #define TUSB_PRINT4(string, a, b, c, d) \
   180 #define TUSB_PRINT4(string, a, b, c, d) \
   185 		do { \
   181 		do { \
   186 			if (iConsole) \
   182 			if (iConsole) \
   187 			{			\
   183 			{			\
   188 			iConsole->Printf(_L(string), (a), (b), (c), (d)); \
   184 			iConsole->Printf(_L(string), (a), (b), (c), (d)); \
   189 			iConsole->Printf(_L("\n")); \
   185 			iConsole->Printf(_L("\n")); \
   190 			}	\
   186 			}	\
   191 		RDebug::Print(_L(string), (a), (b), (c), (d)); \
       
   192 		} while (0)
   187 		} while (0)
   193 
   188 
   194 #define TUSB_PRINT5(string, a, b, c, d, e) \
   189 #define TUSB_PRINT5(string, a, b, c, d, e) \
   195 		do { \
   190 		do { \
   196 			if (iConsole) \
   191 			if (iConsole) \
   197 			{			\
   192 			{			\
   198 			iConsole->Printf(_L(string), (a), (b), (c), (d), (e)); \
   193 			iConsole->Printf(_L(string), (a), (b), (c), (d), (e)); \
   199 			iConsole->Printf(_L("\n")); \
   194 			iConsole->Printf(_L("\n")); \
   200 			}	\
   195 			}	\
   201 		RDebug::Print(_L(string), (a), (b), (c), (d), (e)); \
       
   202 		} while (0)
   196 		} while (0)
   203 
   197 
   204 #define TUSB_PRINT6(string, a, b, c, d, e, f) \
   198 #define TUSB_PRINT6(string, a, b, c, d, e, f) \
   205 		do { \
   199 		do { \
   206 			if (iConsole) \
   200 			if (iConsole) \
   207 			{			\
   201 			{			\
   208 			iConsole->Printf(_L(string), (a), (b), (c), (d), (e), (f)); \
   202 			iConsole->Printf(_L(string), (a), (b), (c), (d), (e), (f)); \
   209 			iConsole->Printf(_L("\n")); \
   203 			iConsole->Printf(_L("\n")); \
   210 			}	\
   204 			}	\
   211 		RDebug::Print(_L(string), (a), (b), (c), (d), (e), (f)); \
       
   212 		} while (0)
   205 		} while (0)
   213 
   206 
   214 #define TUSB_VERBOSE_PRINT(string) \
   207 #define TUSB_VERBOSE_PRINT(string) \
   215 		do { \
   208 		do { \
   216 		if (gVerbose) \
   209 		if (gVerbose) \
   266 				if (iConsole) \
   259 				if (iConsole) \
   267 				{			\
   260 				{			\
   268 				aConsole->Printf(_L(string)); \
   261 				aConsole->Printf(_L(string)); \
   269 				aConsole->Printf(_L("\n")); \
   262 				aConsole->Printf(_L("\n")); \
   270 				}	\
   263 				}	\
   271 			RDebug::Print(_L(string)); \
       
   272 			} \
   264 			} \
   273 		} while (0)
   265 		} while (0)
   274 
   266 
   275 #define TUSB_HEAPSIZE(string) \
   267 #define TUSB_HEAPSIZE(string) \
   276 		do { \
   268 		do { \
   277 			TInt totalSize = 0; \
   269 			TInt totalSize = 0; \
   278 			TInt numCells = User::AllocSize (totalSize); \
   270 			TInt numCells = User::AllocSize (totalSize); \
   279 			RDebug::Print(_L(string)); \
       
   280 			RDebug::Print(_L(" Heap Cells %d Size %d\n"),numCells,totalSize); \
       
   281 		} while (0)
   271 		} while (0)
   282 	
   272 	
   283 #endif	// __GENERAL_H__
   273 #endif	// __GENERAL_H__