Our website is under construction. Please stay tuned!

dwm_i2c_write

Writes data to I2C slave.

void dwm_i2c_write(uint8_t, uint8_t*, uint8_t, boolean_t)
Parameters
  • input – addr, data, len, no_stop

  • addr – ? 8-bit integer ? (Address of a slave device (only 7 LSB))

  • data – ? 8-bit integer ? (Pointer to a transmit buffer)

  • len – ? 8-bit integer ? (Number of bytes to send)

  • no_stop – ‘0’ | ‘1’ (If set, the stop condition is not generated on the bus after the transfer has been completed successfully (allowing for a repeated :param start in the next transfer))

  • outputStatus code

C code example

uint8_t data[2];
const uint8_t addr= 1; // some address of the slave device
data[0]= 0xAA;
data[1]= 0xBB;
dwm_i2c_write(addr, data, 2, true);

SPI/UART example

not available on these interfaces