--- a/usbmgmt/usbmgrtest/t_termusb2/src/t_termusb2.cpp Tue Aug 31 17:01:47 2010 +0300
+++ b/usbmgmt/usbmgrtest/t_termusb2/src/t_termusb2.cpp Wed Sep 01 12:35:00 2010 +0100
@@ -203,6 +203,11 @@
aBuf.Append(_L("DSR/DTR "));
if (aConfig.iHandshake&KConfigWriteBufferedComplete)
aBuf.Append(_L("Early "));
+ //|KConfigObeyDCD|KConfigFailDCD|))
+
+
+// if (aConfig.iBreak==TEiger::EBreakOn)
+// aBuf.Append(_L("Brk "));
if (aConfig.iFifo==EFifoEnable)
aBuf.Append(_L("Fifo "));
@@ -216,6 +221,10 @@
aBuf.Append(_L("LpBk"));
else if ((aSettings.iRxMode&~ECapture)==ECountChars)
aBuf.Append(_L("CtCh"));
+ //else if (aSettings.iRxMode==ERxOff)
+ //{
+ //aBuf.Append(_L("NoRx"));
+ //}
aBuf.Append(_L(" "));
aBuf.AppendNum((TInt)(RThread().Priority()));
if (aSettings.iInfraRed==1)
@@ -346,6 +355,23 @@
aWait=ETrue;
}
+/*LOCAL_C void GetBreak(const TDesC &aDes)
+ {
+
+ if (aDes==_L(""))
+ {
+ if (data.iBreak==TEiger::EBreakOn)
+ data.iBreak=TEiger::EBreakOff;
+ else
+ data.iBreak=TEiger::EBreakOn;
+ }
+ if (aDes.FindF(_L("N"))>=0)
+ data.iBreak=TEiger::EBreakOn;
+ if (aDes.FindF(_L("F"))>=0)
+ data.iBreak=TEiger::EBreakOff;
+ SetConfig();
+ }
+*/
LOCAL_C void GetFifo(TUint& aFifo, const TDesC &aDes)
{
@@ -440,6 +466,8 @@
TPtrC s(&a,1);
dialog.Write(s);
aSettings.iDumpData.Append(k.Code());
+ //if (a=='\r')
+ // dialog.Write(_L("\n"));
} while (aSettings.iDumpData.Length()<KMaxDumpLength);
dialog.Destroy();
@@ -498,6 +526,8 @@
GetStopBit(aConfig.iStopBits, right);
if (des[0]=='L')
GetLength(aConfig.iDataBits, right);
+// if (des[0]=='K')
+// GetBreak(aSettings.iBreak, right);
if (des[0]=='F')
GetFifo(aConfig.iFifo, right);
if (des[0]=='I')
@@ -622,6 +652,17 @@
// Initialisation
+/*
+ // I don't belive this section of code is being used anymore and
+ // has been replaced with PORT_NAME.
+ // I'm not sure so I've left it here ...
+
+ TBuf <0x100> cmd;
+ User::CommandLine(cmd);
+ TInt port=0;
+ if ((cmd.Length()>0) && (cmd[0]>='1' && cmd[0]<='4'))
+ port=(TInt)(cmd[0]-'0');
+*/
// Load Device Drivers
TInt r;
@@ -720,7 +761,7 @@
RDebug::Print(_L("E32Main: Open USB Comm Port"));
TheCommPort.Config(TheConfigBuf); // get config
- TheConfig.iHandshake=0;
+ TheConfig.iHandshake=0; //KConfigObeyXoff|KConfigSendXoff;
TheConfig.iTerminator[0] = 'Z';
TheConfig.iTerminatorCount = 1;
TheCommPort.SetConfig(TheConfigBuf);