diff -r 578be2adaf3e -r 307f4279f433 Adaptation/GUID-360DEB3A-3E38-413A-9941-6C758BA01ADE.dita --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Adaptation/GUID-360DEB3A-3E38-413A-9941-6C758BA01ADE.dita Fri Oct 15 14:32:18 2010 +0100 @@ -0,0 +1,169 @@ + + + + + +DSDIOSession +Class TutorialDescribes the DSDIOSession API class. +
Description

This +class is used for setting up a session to form specific SDIO specific command +sequences.

The stages involved in initializing a session are as follows:

    +
  1. The session is first +created with the required parameter values

  2. +
  3. The session is placed +on the stack.

  4. +
  5. On completion of initialization, +a callback is called.

  6. +

It is intended that the DSDIORegInterface class +should be used for the majority of SDIO operations. This class should only +be used in more complex scenarios, for example where the asynchronous nature +of the stack could be an advantage. The same thing can also be achieved with +the DSDIORegInterface documented here .

Some +functions have an auto-increment parameter. If the hardware function requires +you to use the register as a pointer to an address, auto-increment automatically +increments the register to point to the next address after each call. If the +hardware function requires you to use the register as a FIFO, auto-increment +should be disabled.

+ + + +

Header file

+

sdio.h

+
+ +

Source code file

+

sdiosession.cpp

+
+ +

Required libraries

+

EPBUSSDIO

+
+ +

Class declaration

+

class DSDIOSession : public DSessionBase

+
+ + +
+
SetupCIMIoWrite()

The +function declaration for the SetupCIMIoWrite() method is:

IMPORT_C void SetupCIMIoWrite(TUint32 aAddr, TUint8 aWriteVal, TUint8* aReadDataP);

Description

Set the session to transfer a single byte of +data to the card, and optionally read the register after the write operation.

Parameters

+ + + +

TUint32 aAddr

+

Address of the destination register.

+
+ +

TUint8 aWriteVal

+

The byte to be written

+
+ +

TUint8* aReadDataP

+

Pointer to the start of the byte which is to be read into.

If +this parameter is NULL, then a read-after-write operation is not performed.

+
+ + +

Return value

None

+
SetupCIMIoRead()

The +function declaration for the SetupCIMIoRead() method is:

IMPORT_C void SetupCIMIoRead(TUint32 aAddr, TUint8* aReadDataP);

Description

Set the session to perform a read of a single +byte of data from the card.

Parameters

+ + + +

TUint32 aAddr

+

Address of the source register.

+
+ +

TUint8* aReadDataP

+

Pointer to the byte which is to be read into.

+
+ + +

Return value

None

+
SetupCIMIoWriteMultiple()

The +function declaration for the SetupCIMIoWriteMultiple() method +is:

IMPORT_C void SetupCIMIoWriteMultiple(TUint32 aAddr, TUint32 aLen, TUint8* aDataP, TBool aInc);

Description

Sets the session to perform a multi-byte (or multi-block) transfer +of data to the card.

Parameters

+ + + +

TUint32 aAddr

+

Address of the destination register.

+
+ +

TUint32 aLen

+

The number of bytes to be transferred.

+
+ +

TUint8* aDataP

+

Pointer to the start of the source buffer.

+
+ +

TBool aInc

+

Specifies whether the auto-increment feature is enabled or not.

+
+ + +

Return value

None

+
SetupCIMIoReadMultiple()

The +function declaration for the SetupCIMIoReadMultiple() method +is:

IMPORT_C void SetupCIMIoReadMultiple(TUint32 aAddr, TUint32 aLen, TUint8* aDataP, TBool aInc);

Description

Sets the session to perform a multi-byte (or multi-block) transfer of +data from the card.

Parameters

+ + + +

TUint32 aAddr

+

Address of the source register.

+
+ +

TUint32 aLen

+

The number of bytes to be transferred.

+
+ +

TUint8* aDataP

+

Pointer to the start of the destination buffer.

+
+ +

TBool aInc

+

Specifies whether the auto-increment feature is enabled or not.

+
+ + +

Return value

None

+
SetupCIMIoModify()

The +function declaration for the SetupCIMIoModify() method +is:

IMPORT_C void SetupCIMIoModify(TUint32 aAddr, TUint8 aSet, TUint8 aClr, TUint8* aReadDataP);

Description

Sets the session to perform a safe read-modify-write operation on a single +byte of data on the card.

Parameters

+ + + +

TUint32 aAddr

+

Address of the destination register.

+
+ +

TUint8 aSet

+

A bitmask of the values to be set: pass 1 where the bit is to be +set, otherwise pass 0.

+
+ +

TUint8 aClr

+

A bitmask of the values to be cleared: pass 1 where the bit is to +be cleared, otherwise pass 0.

+
+ +

TUint8* aReadDataP

+

If this value is not NULL, then the result of the modification is +returned in this parameter.

+
+ + +

Return value

None

+
\ No newline at end of file