kernel/eka/drivers/iic/iic.cpp
changeset 247 d8d70de2bd36
parent 0 a41df078684a
child 257 3e88ff8f41d5
--- a/kernel/eka/drivers/iic/iic.cpp	Tue Jul 06 15:50:07 2010 +0300
+++ b/kernel/eka/drivers/iic/iic.cpp	Wed Aug 18 11:08:29 2010 +0300
@@ -26,6 +26,10 @@
 // Global Controller pointer
 static DIicBusController* TheController = NULL;
 
+#ifdef IIC_SIMULATED_PSL
+DIicBusController*& gTheController = TheController;
+#endif
+
 //
 //		Implementation of generic IicBus API for client interface
 //
@@ -1014,63 +1018,8 @@
 
 #endif
 
-#ifdef IIC_SIMULATED_PSL
-TVersion DIicPdd::VersionRequired()
-	{
-	const TInt KIicMajorVersionNumber=1;
-	const TInt KIicMinorVersionNumber=0;
-	const TInt KIicBuildVersionNumber=KE32BuildVersionNumber;
-	return TVersion(KIicMajorVersionNumber,KIicMinorVersionNumber,KIicBuildVersionNumber);
-	}
-
-/** Factory class constructor */
-DIicPdd::DIicPdd()
-	{
-    iVersion = DIicPdd::VersionRequired();
-	}
-
-DIicPdd::~DIicPdd()
-	{
-	delete TheController;
-	}
-
-TInt DIicPdd::Install()
-    {
-    return(SetName(&KPddName));
-    }
+#ifndef IIC_SIMULATED_PSL
 
-/**  Called by the kernel's device driver framework to create a Physical Channel. */
-TInt DIicPdd::Create(DBase*& /*aChannel*/, TInt /*aUint*/, const TDesC8* /*anInfo*/, const TVersion& /*aVer*/)
-    {
-    return KErrNone;
-    }
-
-/**  Called by the kernel's device driver framework to check if this PDD is suitable for use with a Logical Channel.*/
-TInt DIicPdd::Validate(TInt /*aUnit*/, const TDesC8* /*anInfo*/, const TVersion& aVer)
-    {
-   	if (!Kern::QueryVersionSupported(DIicPdd::VersionRequired(),aVer))
-		return(KErrNotSupported);
-    return KErrNone;
-    }
-
-/** Return the driver capabilities */
-void DIicPdd::GetCaps(TDes8& aDes) const
-    {
-	// Create a capabilities object
-	TCaps caps;
-	caps.iVersion = iVersion;
-	// Zero the buffer
-	TInt maxLen = aDes.MaxLength();
-	aDes.FillZ(maxLen);
-	// Copy cpabilities
-	TInt size=sizeof(caps);
-	if(size>maxLen)
-	   size=maxLen;
-	aDes.Copy((TUint8*)&caps,size);
-    }
-#endif
-
-#ifndef IIC_SIMULATED_PSL
 // Client interface entry point
 DECLARE_EXTENSION_WITH_PRIORITY(KExtensionMaximumPriority-1)	// highest priority after Resource Manager
 	{
@@ -1080,26 +1029,6 @@
 	TInt r=TheController->Create();
 	return r;
 	}
-#else
-static DIicPdd* TheIicPdd;
-
-DECLARE_STANDARD_PDD()
-	{
-	TheController = new DIicBusController;
-	if(!TheController)
-		return NULL;
-	TInt r = TheController->Create();
-	if(r == KErrNone)
-		{
-		TheIicPdd = new DIicPdd;
-		if(TheIicPdd)
-			return TheIicPdd;
-		}
-	
-	delete TheController; 
-	return NULL;
-	}
 #endif
 
 
-