kernel/eka/drivers/usbcc/chapter9.cpp
branchRCL_3
changeset 26 c734af59ce98
parent 22 2f92ad2dc5db
child 43 c1f20ce4abcf
equal deleted inserted replaced
24:41f0cfe18c80 26:c734af59ce98
  1134 		return;
  1134 		return;
  1135 		}
  1135 		}
  1136 	// New configuration is the same as the old one (but not 0)
  1136 	// New configuration is the same as the old one (but not 0)
  1137 	if (iCurrentConfig == aValue)
  1137 	if (iCurrentConfig == aValue)
  1138 		{
  1138 		{
  1139 		// no-op
       
  1140 		__KTRACE_OPT(KUSB, Kern::Printf("  Configuration: New == Old == %d --> exiting", aValue));
  1139 		__KTRACE_OPT(KUSB, Kern::Printf("  Configuration: New == Old == %d --> exiting", aValue));
       
  1140 
       
  1141 		// From the spec 9.1.1.5, Data toggle is reset to zero here when 
       
  1142 		// setconfiguration(x->x)(x!=0) received, although we only support
       
  1143 		// single configuration currently.
       
  1144 		TInt num = 0;
       
  1145 		TInt ret = DoForEveryEndpointInUse(&DUsbClientController::ResetDataToggle, num);
       
  1146 		if(ret != KErrNone)
       
  1147 			{
       
  1148 			__KTRACE_OPT(KPANIC, Kern::Printf("  Error: Endpoint data toggle reset failed"));
       
  1149 			}
       
  1150 		__KTRACE_OPT(KUSB, Kern::Printf("  Called ResetDataToggle()for %d endpoints", num));	
       
  1151 	
  1141 		return;
  1152 		return;
  1142 		}
  1153 		}
  1143 	// Device is already configured
  1154 	// Device is already configured
  1144 	if (iCurrentConfig != 0)
  1155 	if (iCurrentConfig != 0)
  1145 		{
  1156 		{