usbmgmt/usbmgrtest/t_catc/src/t_catc.cpp
changeset 25 4ddb65515edd
parent 0 c9bc50fca66e
child 43 012cc2ee6408
--- a/usbmgmt/usbmgrtest/t_catc/src/t_catc.cpp	Mon May 03 14:13:42 2010 +0300
+++ b/usbmgmt/usbmgrtest/t_catc/src/t_catc.cpp	Fri Jun 25 13:07:44 2010 +0800
@@ -37,12 +37,10 @@
 TCommConfigV01& TheConfig = TheConfigBuf();
 
 const TInt KReceiveBufferLength = 65536/*16384*/; // TODO: speed enhancement!
-//const TInt KMaxBufferSize = 8192; // TODO: speed enhancement!
 const TUint KChunkSize = 65536;
 
 ////////////////////////////////////////////////////////////////////////////////
 
-//_LIT(KUsbCsyName, "ECACM");
 _LIT(KUsbPortName, "ACM::0");
 _LIT(KUsbLddName, "EUSBC");
 
@@ -137,7 +135,6 @@
 	TRequestStatus status;
 	RComm port;
 
-//	static TBuf8<1024> OUT_Buf; // TODO: speed enhancement!
 	static TBuf8<KChunkSize> OUT_Buf;
 
 	_printf(_L("\n"));
@@ -162,7 +159,6 @@
 	console->Read(consoleStatus);
 	
 	TInt uReadCount = 0 ;
-	//TInt uThermoBar = 0 ; // TODO: speed enhancement! (remove ThermoBar fnality)
 
 	_printf(_L("\tWatch :  "));
 
@@ -216,25 +212,6 @@
 				}
 
 			uReadCount += OUT_Buf.Length() ;
-
-/*			if( uReadCount >= 1024 )
-				{
-				// uThermoBar runs from 0..63
-
-				uThermoBar = ( uThermoBar + 1 ) & 0x3F ;
-
-				if( uThermoBar < 32 )
-					{
-					_printf(_L("*"));
-					}
-				else
-					{
-					_printf(_L("\b \b"));
-					}
-
-				uReadCount -= 1024 ;
-				}
-				*/
 			}
 		else
 			{
@@ -270,7 +247,6 @@
 	TRequestStatus status;
 	RComm port;
 
-//#define uInBufSize 4096 // TODO: speed enhancement! reduce number of IPC calls
 #define uInBufSize 65536
 
 	static TBuf8<uInBufSize> IN_Buf;
@@ -337,7 +313,6 @@
 	TInt bNeedZLP = bUseZLP && ((IN_Buf.Length()%64)==0);
 
 	TInt uWriteCount = 0 ;
-//	TInt uThermoBar = 0 ; // TODO: speed enhancement!
 
 	_printf(_L("\tWatch :  "));
 
@@ -378,24 +353,6 @@
 
 			// reassure watcher that there is something happening...
 
-/*			while( uWriteCount >= 1024 )
-				{
-				// uThermoBar runs from 0..63
-
-				uThermoBar = ( uThermoBar + 1 ) & 0x3F ;
-
-				if( uThermoBar < 32 )
-					{
-					_printf(_L("*"));
-					}
-				else
-					{
-					_printf(_L("\b \b"));
-					}
-  
-				uWriteCount -= 1024 ;
-				}
-				*/
 			}
 		else
 			{
@@ -498,49 +455,7 @@
 	_printf(_L("Restarted USB.\n"));
 	}
 
-////////////////////////////////////////////////////////////////////////////////
 
-/*void ThermoBar()
-	{
-	TUint uCol = 0 ;
-
-	TTime		now;
-
-	TDateTime	WasDT;
-	TDateTime	NowDT;
-
-	now.HomeTime(); 
-	WasDT = now.DateTime();
-
-	for( TUint line = 0 ; line < 30 ; )
-		{
-		for( TUint dotO = 0 ; dotO < 1000 ; dotO++ )
-			{
-			for( TUint dotI = 0 ; dotI < 1000 ; dotI++ )
-				{
-				;
-				}
-			}
-
-		_printf(_L("*"));
-
-		now.HomeTime(); 
-		NowDT = now.DateTime();
-
-		if( ( ++uCol >= 79 ) || ( WasDT.Second() != NowDT.Second() ) )
-			{
-			_printf(_L("\n"));
-
-			uCol = 0 ;
-
-			line++ ;
-
-			WasDT = now.DateTime() ;
-			}
-		}
-	}
-*/
-////////////////////////////////////////////////////////////////////////////////
 
 void ToggleTermL()
 	{
@@ -659,7 +574,6 @@
 		_printf(_L("2. Bulk IN  test    \n"));
 		_printf(_L("3. Set handshaking  \n"));
 		_printf(_L("4. Restart USB      \n"));
-//		_printf(_L("5. Run ThermoBar    \n"));
 		_printf(_L("6. Swap Read Method \n"));
 		_printf(_L("7. Swap ZLP Method  \n"));
 		_printf(_L("8. Swap Term Method \n"));
@@ -675,7 +589,6 @@
 		case '2': Bulk_IN_TestL();							break;
 		case '3': SetHandshakingL();						break;
 		case '4': RestartUsbL();							break;
-//		case '5': ThermoBar();								break;
 		case '6': bReadCall = ( bReadCall == EFalse ) ;		break;
 		case '7': bUseZLP   = ( bUseZLP == EFalse ) ;		break;
 		case '8': ToggleTermL() ;							break;