I2C:LegacyReadRegisters8

Revision as of 16:42, 28 May 2026 by TimmSkiller (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Request

Index Word Description
0
Header 0x000F00C0 Cmd 0x000F Param 3 Xlat 0
1 u8, device ID
2 u8, starting register
3 u32, size

Request Static Buffers

The handler for this IPC command expects the following 0x100-bytes after the beginning of the above command buffer:

Index Word Description
0 Descriptor for static buffer (id 0)
1 Output buffer pointer

Response

Index Word Description
0
Header 0x000F0042 Cmd 0x000F Param 1 Xlat 2
1 Result code
2 Descriptor for static buffer (id 0)
3 Output buffer pointer

Description

Reads a range of 8-bit I2C registers of the specified device sequentially to the given buffer.

The maximum output buffer size is 0x200 for the New3DS i2c-sysmodule, and 0x20 for the Old3DS version.

This is similar to I2C:ReadRegisters8 except:

  • Before selecting the device, this waits 1500ns.
  • Before reading the first byte and after reading the last byte, this waits 15µs.

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