Command Objects

The MultiMediaCard controller uses a TMMCCommandDesc object to contain command and parameter information when issuing a command over the bus.

This object is also used to contain response information resulting from the execution of that command.

As it can sometimes be necessary to temporarily save current command and parameter information, the controller implements a small stack of TMMCCommandDesc objects. The controller then has the concept of a current command information object.

The platform independent layer provides three functions through which command and parameter information can be set up:

These functions are used to fill the current TMMCCommandDesc object.

The controller executes a single command by calling the state machine function DMMCStack::IssueMMCCommandSM(); this is implemented by the platform specific layer as part of the porting activity.

It calls DMMCSession::Command() to access the current command and parameter information.

The command stack

Internally, the command stack is implemented as a simple array of TMMCCommandDesc objects; this is the DMMCSession::iCommand[] private data member. The stack is KMaxMMCCommandStackDepth deep. Internally, the current command information object is identified and accessed through the DMMCSession::iCmdSP data member, which indexes into the array and acts as a pointer to the current command information object.

The platform independent layer provides two protected functions that the platform specific layer can use to change the command information object that is current: