2-dimensional arrays

Hi everyone,

I would like to use the C programming language to create a two-dimensional array representing the following table:

A better diagram is provided in the attached file.

| idle | ready | transfer
-----------------------
CMD7(addr) | ready | transfer | idle
CMD7(not addr) | transfer | idle | ready
CMD9 | idle | transfer | ready
: : : :
etc. etc. etc. etc.

I have wrote some of the program and I am stuck now. I hope someone can kindly provide some help. Many grateful thanks in advance.

typedef enum
{
IDLE_STATE,
READY_STATE,
IDENTIFICATION_STATE,
STANDBY_STATE,
TRANSFER_STATE,
SENDING_DATA_STATE,
RECEIVE_DATA_STATE,
PROGRAMMING_STATE,
DISCONNECT_STATE,
INACTIVE_STATE,
WAIT_IRQ_STATE
} MMC_CurrentState;

int MMC_StateTransitionTable[][];
[1219 byte] By [sonicstaars] at [2007-11-18 19:27:53]
# 1 Re: 2-dimensional arrays
[Yves: moved, even though it's a C question]
Yves M at 2007-11-9 0:32:34 >