---
tag: m0260
title: I2C Send
brief: Send data to the I2C bus.
author: thinkyhead

group: i2c
requires: EXPERIMENTAL_I2CBUS
experimental: true

codes: [ M260 ]
related: [ M261 ]

parameters:

- tag: A
  optional: true
  description: The bus address to send to
  values:
  - tag: addr
    type: int

- tag: B
  optional: true
  description: The byte to add to the buffer
  values:
  - tag: byte
    type: int

- tag: R
  optional: true
  type: flag
  description: Flag to reset and rewind the I2C buffer

- tag: S
  optional: true
  type: flag
  description: Send flag. Flush the buffer to the bus.

examples:

- pre: Send "Marlin" to the slave device with address 0x63 (99)
  code: |
    M260 A99  ; Target slave address
    M260 B77  ; M
    M260 B97  ; a
    M260 B114 ; r
    M260 B108 ; l
    M260 B105 ; i
    M260 B110 ; n
    M260 S1   ; Send the current buffer

- pre: Request 6 bytes from slave device with address 0x63 (99)
  code: |
    > M261 A99 B5
    i2c-reply: from:99 bytes:5 data:hello

---

Utility to send data over the I2C bus.
