...
The remaining functions (CmdStart()
, CmdWaitEnd()
, CmdDataRd()
, CmdDataWr()
) constitute the command execution state machine (see Figure 14-9). A return error from one of the functions will abort the state machine, so the requisite considerations, such as preparing for the next command or preventing further interrupts, must be first handled.
Figure 14-9 Command execution