Information Technology Reference
In-Depth Information
Command and Response Structures
Each 48-bit command can be accessed as six generic bytes, a command byte
plus four address bytes and CRC byte, or a command byte plus a 4-byte
address, a 7-bit CRC value, and an end bit.
The CMD_PACKET union provides these options:
typedef union
{
struct
{
byte field[5];
};
struct
{
byte crc;
byte addr0; // LSB
byte addr1;
byte addr2;
byte addr3; // MSB
byte cmd;
};
struct
{
unsigned END_BIT:1;
unsigned CRC7:7;
dword address;
byte command;
};
} CMD_PACKET;
The SDC_RESPONSE union can hold a RESPONSE_1 or RESPONSE_2
structure as defined earlier in this chapter:
typedef union
{
RESPONSE_1 r1;
RESPONSE_2 r2;
} SDC_RESPONSE;
Search WWH ::




Custom Search