I2C:WriteRegisters16

From 3dbrew
Revision as of 16:41, 28 May 2026 by TimmSkiller (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Request

Index Word Description
0
Header 0x000C00C2 Cmd 0x000C Param 3 Xlat 2
1 u8, device ID
2 u16, starting register
3 u32, size
4 Descriptor for static buffer (id 1)
5 Input buffer pointer

Response

Index Word Description
0
Header 0x000C0040 Cmd 0x000C Param 1 Xlat 0
1 Result code

Description

Writes the given buffer sequentially to a range of 16-bit I2C registers of the specified device.

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

For example, writing a buffer of consisting of { 0xAAAA, 0xBBBB, 0xCCCC, 0xDDDD } with starting register 0x5 would do the following:

    reg[0x5] = 0xAAAA
    reg[0x6] = 0xBBBB
    reg[0x7] = 0xCCCC
    reg[0x8] = 0xDDDD

This is similar to I2C:WriteRegisters8 except this uses 16-bit registers.