kernel/eka/include/drivers/mmc.h
changeset 259 57b9594f5772
parent 139 95f71bcdcdb7
child 257 3e88ff8f41d5
child 287 ddfd5aa0d58f
--- a/kernel/eka/include/drivers/mmc.h	Wed Aug 18 11:08:29 2010 +0300
+++ b/kernel/eka/include/drivers/mmc.h	Thu Sep 02 21:54:16 2010 +0300
@@ -3014,6 +3014,10 @@
 	inline void EnableDoubleBuffering(TUint32 aNumBlocks);							  /**< @internalTechnology */
 	inline void SetDataTransferCallback(TMMCCallBack& aCallback);					  /**< @internalTechnology */
 	inline void MoreDataAvailable(TUint32 aNumBlocks, TUint8* aMemoryP, TInt aError); /**< @internalTechnology */
+
+	inline void SaveCard();			/**< @internalTechnology */
+	inline void RestoreCard();		/**< @internalTechnology */
+
 public:
 	/**
     The last R1 response.
@@ -3057,7 +3061,9 @@
 	
 	TMMCCallBack iDataTransferCallback;	// A callback function, used to request more data when performing double-buffering
 
-	TUint32 iSpare[22];				// Spare data (stolen from iCommand)
+	TUint32 iSpare[21];				// Spare data (stolen from iCommand)
+
+	TMMCard* iSavedCardP;			// Saved copy of iCardP
 
 	TMMCStateMachine iMachine;		// State Machine context
 #ifdef __EPOC32__
@@ -3091,7 +3097,8 @@
 		KInterfaceSetBusWidth,
 		KInterfaceDemandPagingInfo,
 		KInterfaceCancelSession,
-		KInterfaceDoWakeUpSM
+		KInterfaceDoWakeUpSM,
+		KInterfaceAddressCard,
 		};
 
 	/** generic interface */
@@ -3137,6 +3144,17 @@
 		virtual TMMCErr DoWakeUpSM()=0;
 		};
 
+	/**
+	 * An optional interface implemented by the derived class. Used when the stack supports more than one 
+	 * card and the cards are individually selectable, i.e. iMultiplexedBus is true
+	 * @see KInterfaceAddressCard
+	 */
+	class MAddressCard
+		{
+	public:
+		virtual void AddressCard(TInt aCardNumber)=0;
+		};
+
 
 public:
 	IMPORT_C DMMCStack(TInt aBus, DMMCSocket* aSocket);
@@ -3526,6 +3544,8 @@
 
 	void DetermineBusWidthAndClock(const TMMCard& aCard, TBool aLowVoltage, TUint& aPowerClass, TBusWidthAndClock& aBusWidthAndClock);
 	TUint GetPowerClass(const TMMCard& aCard, TBusWidthAndClock aWidthAndClock, TBool aLowVoltage);
+	
+	void DoAddressCard(TInt aCardNumber);
 
 
     //	----------- Data Members -------------
@@ -3604,6 +3624,8 @@
 protected:
 	/** 
 	Gets an interface from a derived class
+	N.B the derived class should call the base class's default implementation of this function
+	if it does not support the specified interface
 	replaces reserved virtual Dummy4()
 	*/
 	IMPORT_C virtual void GetInterface(TInterfaceId aInterfaceId, MInterface*& aInterfacePtr);
@@ -4107,6 +4129,7 @@
 		EMMCUnblockingInWrongContext	=18,
 		EMMCInvalidCardNumber			=19,
 		EMMCNotInDfcContext				=20,
+		EMMCAddressCardNotSupported		=21,
 		};
     IMPORT_C static void Panic(TMMCPanic aPanic);
 	friend class DMMCStack;