Read and Write Response Formats
Command code:0x21
Response Data Structure
typedef struct tag_STD_SMBUS_RSP
{
unsigned short error_code;
unsigned short opcode;
unsigned int total_length;
unsigned int length;
unsigned char data[20];
}STD_SMBUS_RSP;
Object Data Structure
Response Data Structure |
Bytes |
Name |
Description |
1 ~ 2 |
error_code |
Error code. For details, see Error Code Definitions. NOTE:
For all requests, no matter whether the value of error_code in the response is 0, the slave must return the data of the total_length, length, and data fields (all set to 0) to keep the total length of the response frame unchanged. |
|
3 ~ 4 |
opcode |
Command word. For details, see the Data Register Key Definition definition. |
|
5 ~ 8 |
total_length |
Total length of opcode data. |
|
9 ~ 12 |
length |
Data zone length. If the total length of the opcode data defined in this specification is longer, the length (from error_code to data) of each response is M bytes. If the frame is the last frame and the data zone length is less than (32-12) bytes, zeros must be added. If the total data length of the opcode defined in this specification is fixed, the data response length of other frames except the last frame response must be (32-12) bytes. |
|
13 ~ N |
data |
Data area. If the length of the data is less than 32 bytes, 0 is filled in. |