lophtware

Logo

lophtware projects

GitHub Profile

I2C - Command Acknowledgement

Report Type: Interrupt IN
Report Size: 7 Bytes

Report ID Acknowledged Report ID Status Arguments
00000001 1 byte n i ccccccc 4 bytes

If an OUT Report does not have its own dedicated acknowledgement report(s) then this will be the default response to any of the commands that the Host sends to the device. The Acknowledgement Report will be sent to the Host on the Interrupt IN endpoint that corresponds to the interface where the initial command was sent.

Report ID

HID Report ID. Always 0x01.

Acknowledged Report ID

The ID of the OUT Report sent by the Host that is being ACK’d or NACK’d. Note that the order of responses to commands is not necessarily in the same order as they are received so you must only send one command of a given type to an interface at a time and wait for its acknowledgement.

Status and Arguments

The status of the command that was executed:

Bits Direction Meaning
n IN Negative Acknowledgement flag; 1 if the command is NACK’d (an error), or 0 if it is ACK’d (no error).
i IN Interface-specific (ie. non-generic) error code if 1, else a generic error code if 0.
ccccccc IN A status code to give more meaning to the ACK or NACK; see below.

Generic ACK Status Codes

Code Arguments Meaning
0x00 Reserved (All Zeroes) Success - the command executed without errors.

Generic NACK Status Codes

Code Arguments Meaning
0x01 Reserved (All Zeroes) Unknown report ID.
0x02 Reserved (All Zeroes) Queue full (probably too many requests pending).
0x03 Reserved (All Zeroes) Index, offset or address is out of bounds.
0x10 Reserved (All Zeroes) Invalid Unlock Key.