I2C:ReadRegistersBuffer8
Request
| Index Word | Description | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| 0 |
| ||||||||
| 1 | u8, device ID | ||||||||
| 2 | u8, starting register | ||||||||
| 3 | u32, size | ||||||||
| 4 | Descriptor for mapping a write-only buffer in the target process | ||||||||
| 5 | Output buffer pointer |
Response
| Index Word | Description | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| 0 |
| ||||||||
| 1 | Result code | ||||||||
| 2 | Descriptor for mapping a write-only buffer in the target process | ||||||||
| 3 | Output buffer pointer |
Description
Reads a range of 8-bit I2C registers of the specified device sequentially to the given buffer.
Similar to I2C:ReadRegisters8, except this version uses a mapped buffer instead of a static buffer.
For example, assuming:
reg[5] = 0xAA, reg[6] = 0xBB, reg[7] = 0xCC, reg[8] = 0xDD
Then reading 4 bytes with starting register 5 would result in:
outbuf[0] = 0xAA
outbuf[1] = 0xBB
outbuf[2] = 0xCC
outbuf[3] = 0xDD