All pastes #441516 Raw Edit

Miscellany

public text v1 · immutable
·published 2007-04-15 19:07 UTC
rendered paste body
#define COPROCESSOR_ID 1

const char bus_key[] = "Some magic key to be sent to an I2C peripheral";

void i2c_start_write(int device_id, char *data, int data_len) {
  /* Tell the DMA controller to shove the data out */
}

int init_i2c() {
  /* Initialization of the bus... */

  i2c_start_write(COPROCESSOR_ID, bus_key, sizeof(bus_key)-1);
}