--- a/kernel/eka/include/drivers/mmc.h Thu Aug 19 11:14:22 2010 +0300
+++ b/kernel/eka/include/drivers/mmc.h Tue Aug 31 16:34:26 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;