equal
deleted
inserted
replaced
39 RCommServ TheCommServ; |
39 RCommServ TheCommServ; |
40 RUsb TheUsb; |
40 RUsb TheUsb; |
41 RUsb TheSecondUsbSession; |
41 RUsb TheSecondUsbSession; |
42 TBool ThePrimaryClient; |
42 TBool ThePrimaryClient; |
43 |
43 |
|
44 //_LIT(KUsbCsyName, "ECACM"); |
|
45 //_LIT(KUsbPortName, "ACM::0"); |
44 _LIT(KUsbLddName, "EUSBC"); |
46 _LIT(KUsbLddName, "EUSBC"); |
45 |
47 |
46 // These are used in the startup stress test. |
48 // These are used in the startup stress test. |
47 TInt64 TheRandomSeed = 0; |
49 TInt64 TheRandomSeed = 0; |
48 const TInt KMaxCancelTime = 2000000; |
50 const TInt KMaxCancelTime = 2000000; |
652 _printf(_L("Session 2: ")); |
654 _printf(_L("Session 2: ")); |
653 PrintUsbServiceState(serviceState); |
655 PrintUsbServiceState(serviceState); |
654 |
656 |
655 TheSecondUsbSession.Close(); |
657 TheSecondUsbSession.Close(); |
656 } |
658 } |
657 |
659 /* |
|
660 void RegisterAsPrimaryClientL() |
|
661 { |
|
662 LEAVEIFERROR(TheUsb.RegisterAsPrimarySession()); |
|
663 ThePrimaryClient = ETrue; |
|
664 } |
|
665 |
|
666 void DeregisterAsPrimaryClientL() |
|
667 { |
|
668 LEAVEIFERROR(TheUsb.DeregisterAsPrimarySession()); |
|
669 ThePrimaryClient = EFalse; |
|
670 } |
|
671 */ |
658 void DbgCheckHeapL() |
672 void DbgCheckHeapL() |
659 { |
673 { |
660 _printf(_L("Expected number of allocated heap cells: ")); |
674 _printf(_L("Expected number of allocated heap cells: ")); |
661 |
675 |
662 TBuf<20> numBuf; |
676 TBuf<20> numBuf; |
1034 case '3': MonitorUsbDeviceStateL(); break; |
1048 case '3': MonitorUsbDeviceStateL(); break; |
1035 case '4': ConcurrencyTestsL(); break; |
1049 case '4': ConcurrencyTestsL(); break; |
1036 case '5': SetUsbSerialNumberL(); break; |
1050 case '5': SetUsbSerialNumberL(); break; |
1037 case 's': case 'S': SanityTestL(); break; |
1051 case 's': case 'S': SanityTestL(); break; |
1038 #ifndef HURRICANE |
1052 #ifndef HURRICANE |
1039 case 'm': MemoryTestsL(); break; |
1053 /* case 'r': RegisterAsPrimaryClientL(); break; |
|
1054 case 'd': DeregisterAsPrimaryClientL(); break; |
|
1055 */ case 'm': MemoryTestsL(); break; |
1040 #endif // HURRICANE |
1056 #endif // HURRICANE |
1041 case 'c': case 'C': CloseUsbL(); break; |
1057 case 'c': case 'C': CloseUsbL(); break; |
1042 case 'o': case 'O': OpenUsbL(); break; |
1058 case 'o': case 'O': OpenUsbL(); break; |
1043 case 'q': |
1059 case 'q': |
1044 case 'Q': |
1060 case 'Q': |
1087 _printf(_L("3. Monitor USB device state\n")); |
1103 _printf(_L("3. Monitor USB device state\n")); |
1088 _printf(_L("4. Concurrency tests\n")); |
1104 _printf(_L("4. Concurrency tests\n")); |
1089 _printf(_L("5. Publish Serial Number\n")); |
1105 _printf(_L("5. Publish Serial Number\n")); |
1090 _printf(_L("S. Sanity test- quickly calls all APIs to make sure they don't panic\n")); |
1106 _printf(_L("S. Sanity test- quickly calls all APIs to make sure they don't panic\n")); |
1091 #ifndef HURRICANE |
1107 #ifndef HURRICANE |
1092 _printf(_L("M. Memory tests\n")); |
1108 /* _printf(_L("R. Register as primary client\n")); |
|
1109 _printf(_L("D. Deregister as primary client\n")); |
|
1110 */ _printf(_L("M. Memory tests\n")); |
1093 #endif // HURRICANE |
1111 #endif // HURRICANE |
1094 _printf(_L("C. Close connection to USB Manager\n")); |
1112 _printf(_L("C. Close connection to USB Manager\n")); |
1095 _printf(_L("O. Connect to USB Manager\n")); |
1113 _printf(_L("O. Connect to USB Manager\n")); |
1096 |
1114 |
1097 if (TheUsb.Handle()) |
1115 if (TheUsb.Handle()) |