lophtware

Logo

lophtware projects

GitHub Profile

I2C - RAM Transaction

Report Type: Interrupt IN / OUT
Report Size: 40 Bytes
Acknowledged By: Report 0x11 or Command Acknowledgement for USB failures

Report ID Flags Read Address LSB Read Address MSB Read Count Write Address LSB Write Address MSB Write Count Payload
00010001 t 000000 s rrrrrrrr 000000 rr 000 ccccc wwwwwwww 000000 ww 000 CCCCC 32 bytes

Report ID

HID Report ID. Always 0x11.

Flags

Bits Direction Meaning
t IN / OUT Transaction type; 1 for read-then-write, 0 for write-then-read.
s IN Success flag; 1 if the transaction succeeded without errors, 0 if something went wrong. For OUT Reports set this to zero.

Read Address LSB

The Least Significant Byte of the first address that is to be read from. Addresses beyond the bank size of 1024 bytes will wrap.

Read Address MSB

The Most Significant Byte of the first address that is to be read from. Addresses beyond the bank size of 1024 bytes will wrap.

Read Count

The number of bytes to read and return to the Host in the corresponding IN Report, which can be zero. If the count causes the address to go beyond the end of the bank then it will wrap. If the count is greater than the 32-byte payload allowed then a negative Command Acknowledgement (NACK) will be returned as a response.

Write Address LSB

The Least Significant Byte of the first address that is to be written to. Addresses beyond the bank size of 1024 bytes will wrap.

Write Address MSB

The Most Significant Byte of the first address that is to be written to. Addresses beyond the bank size of 1024 bytes will wrap.

Write Count

The number of bytes to write from Payload into the RAM bank, which can be zero. If the count causes the address to go beyond the end of the bank then it will wrap. If the count is greater than the 32-byte payload allowed then a negative Command Acknowledgement (NACK) will be returned as a response.

Payload

For OUT Reports this is the block of data that will be written to the RAM bank.

For IN Reports this is the block of data that was read from the RAM bank.

Notes

This command does not respect the Protected RAM address mask, nor the Write-Protect flag; ie. you can write to any location in RAM. Those mechanisms are intended to protect the bank from other I2C Masters.